c-opts.c (c_common_decode_option): Don't accept dollars as identifier characters in assembly.

* c-opts.c (c_common_decode_option): Don't accept dollars
	as identifier characters in assembly.
	* doc/cpp.texi: Document this.

From-SVN: r66976
This commit is contained in:
Neil Booth 2003-05-19 22:15:57 +00:00 committed by Neil Booth
parent 4b6fe6b647
commit 42ad6c9eb3
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2003-05-19 Neil Booth <neil@daikokuya.co.uk>
* c-opts.c (c_common_decode_option): Don't accept dollars
as identifier characters in assembly.
* doc/cpp.texi: Document this.
2003-05-19 Seth Arnold <sarnold@wirex.com>
Aldy Hernandez <aldyh@redhat.com>

View File

@ -1399,6 +1399,7 @@ c_common_decode_option (argc, argv)
case OPT_lang_asm:
cpp_set_lang (parse_in, CLK_ASM);
cpp_opts->dollars_in_ident = false;
break;
case OPT_lang_objc:

View File

@ -3720,9 +3720,12 @@ implementation-defined characters.
GCC allows the @samp{$} character in identifiers as an extension for
most targets. This is true regardless of the @option{std=} switch,
since this extension cannot conflict with standards-conforming
programs. Currently the targets that by default do not permit
@samp{$} are AVR, IP2K, MMIX, MIPS Irix 3, ARM aout, and PowerPC
targets for the AIX and BeOS operating systems.
programs. When preprocessing assembler, however, dollars are not
identifier characters by default.
Currently the targets that by default do not permit @samp{$} are AVR,
IP2K, MMIX, MIPS Irix 3, ARM aout, and PowerPC targets for the AIX and
BeOS operating systems.
You can override the default with @option{-fdollars-in-identifiers} or
@option{fno-dollars-in-identifiers}. @xref{fdollars-in-identifiers}.