This is the mail archive of the gcc@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]

Re: RFC: adding lookups on the target names for alias attributes


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. 

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