Dollars in identifiers, for the last time

Neil Booth neil@daikokuya.co.uk
Mon May 19 19:49:00 GMT 2003


Andreas Jaeger wrote:-

> This patch seems to be broken, now libffi does not build anymore.  For
> details see my email on the gcc list with subject "libffi broken with
> your latest change".
> 
> Did you build java with this patch?

I didn't build Java, no.  I'm testing this patch.

Neil.

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

Index: c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.48
diff -u -p -r1.48 c-opts.c
--- c-opts.c	19 May 2003 19:19:43 -0000	1.48
+++ c-opts.c	19 May 2003 19:41:17 -0000
@@ -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:
Index: doc/cpp.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/cpp.texi,v
retrieving revision 1.59
diff -u -p -r1.59 cpp.texi
--- doc/cpp.texi	18 May 2003 09:46:22 -0000	1.59
+++ doc/cpp.texi	19 May 2003 19:41:19 -0000
@@ -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}.



More information about the Gcc-patches mailing list