This is the mail archive of the
mailing list for the GCC project.
Re: IA64 HP-UX patch for external function declarations
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Sep 2002 10:12:12 -0700 (PDT)
- Subject: 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.