`$' in identifiers -vs- PPC Linux

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Thu Aug 31 13:12:00 GMT 2000


On Thu, 31 Aug 2000, Franz Sirl wrote:
> At 02:58 31.08.00, Geoff Keating wrote:
> >Tom Tromey <tromey@cygnus.com> writes:
> > > Alexandre> I'm bitten by this problem on AIX 4.1, when compiling
> > > Alexandre> libgcj.  It would be nice if g++ could somehow mangle `$'
> > > Alexandre> so as to accept it in source-code (even if with
> > > Alexandre> -fdollars-in-identifiers) even if the assembler can't
> > > Alexandre> accept them directly.
> > >
> > > Yes.  For instance it could mangle them the way that gcj already
> > > mangles non-ASCII characters that are valid in Java identifiers.
> >
> >It'd be good to move this code into the language-independent parts of
> >the compiler, because it'll be needed even for C mangling of \u escapes
> >in identifiers.
> >
> >I also have no objection to moving DOLLARS_IN_IDENTIFIERS into aix.h
> >if someone wants to generate a patch.  The native assembler on all the
> >ppc sysv stuff is GNU as, which should be OK with $, and it's probably
> >better to be consistent between linuxes.
>
> I can do this patch later today, reminds me that I wanted to move some
> other macros to aix.h stiil.

OK, here is the patch. Bootstrap still running, but I expect no problems 
since problems should already show up during compile :-).

This closes the "move colliding macros from rs6000.h to platform headers" for 
me.
The remaining collisions

 STRICT_ALIGNMENT
 STACK_BOUNDARY
 BIGGEST_ALIGNMENT
 ASM_OUTPUT_INT
 SIZE_TYPE

make no real sense to move into aix.h IMHO.

The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes the 
CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR handling 
I also want to revive execute/20000516-1.c from CVS, this test is meant to 
pass and is _different_ from execute/20000722-1.c. The test verifies that 
CONSTRUCTOR data is put into a writeable section. I didn't notice yet that 
you did remove it, but the removal was wrong.

OK to commit?

BTW, it seems gcc/stmt.c is seriously corrupted in CVS, but I don't know cvs 
well enough to tell if this can be fixed from remote.

Franz.

 
2000-08-31  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
 
        * rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
        ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
        here...
        * rs6000/aix.h: ...to here.
        * rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.
        * rs6000/rs6000.c (rs6000_select_section): Handle CONSTRUCTOR.
        (rs6000_unique_section): Likewise.



More information about the Gcc-bugs mailing list