This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IA64 HP-UX patch for external function declarations


> On Fri, Sep 06, 2002 at 02:15:08PM -0700, Steve Ellcey wrote:
> > + 	  if (real_name[strlen (real_name) - 1] == '#')
> > + 	    real_name[strlen (real_name) - 1] = 0;
> 
> What in the world is going on here?
> The # trailer should never exist as part of the name.

The need for this comes up if one uses a pragma or the __asm__ notation
to set the name of a function.  You need to make the new name include
the '#' trailer because assemble_name will just call fputs to put out
the name you gave it and not call ASM_OUTPUT_LABELREF so no trailer is
automatically added in these cases.  Without stripping this off, I wind
up with one '#' on the call and two on the extern declaration.

Steve Ellcey
sje@cup.hp.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]