This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: adding lookups on the target names for alias attributes
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: RFC: adding lookups on the target names for alias attributes
- From: llewelly at edevnull dot com
- Date: 21 Sep 2000 14:23:23 -0600
- Cc: gcc at gcc dot gnu dot org
- References: <200009210122.SAA00879@kayak.mcgary.org>
Greg McGary <greg@mcgary.org> writes:
> The target name in an alias attribute is always used verbatim and
> never looked-up. The programmer needed to explicitly mangle C++
> function names, and if the alias attribute didn't name a valid program
> object it was silently ineffectual, passing from compiler to
> assembler, then silently ignored by the assembler.
>
> I would like to change that, to the degree that seems reasonable,
> primarily for the benefit of bounded-pointer name mangling.
>
> For C++, it seems reasonable, though painful, to require that the
> programmer explicitly mangle the target name in order to disambiguate
> overloaded names.
I do not think alias attributes are often needed in C++ (C++ provides
a number of standard conforming ways to get vaguely similar
effects), so I am not suggesting your improvement is bad or
inadequate, but in my opinion, a feature that requires a C++
programer to provide a mangled name is a feature which is not merely
painful to use, but infeasible to use. E.g., the current semantics
of alias mean it is no better than an alias which did not work at
all for C++ functions, and your suggestion suggestion means it is
(nearly) unusable for overloaded C++ functions.