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]
Other format: [Raw text]

Re: [c++] Another question about demangler output


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> The point is this.  "typeof" is a GNU/C++ extension.  Its use in a
> function declaration should be mangled differently from any standard
> C++ construction.  After all, the ABI has provided hook for vendor
> extension. 

So you are arguing that this is a bug in g++.

I don't agree.  To me it seems natural that typeof should simply be
replaced by the resulting type when doing name mangling.  I don't see
why that is any different from the way that a typedef is simply
replaced by the resulting type.  The GNU typeof extension is really
just an anonymous typedef.  I see no reason to treat it differently
for name mangling purposes.

If somebody wants to change g++, then I guess any type defined by
typeof should be replaced by something like
    u LEN typeof_XXX
where LEN is the length of the following string and XXX is the mangled
form of the expression which is the argument to typeof.

Ian


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