This is the mail archive of the gcc-bugs@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: snapshot 20010514: compression of mangled name


On Tue, May 22, 2001 at 08:41:54PM -0400, Daniel Berlin wrote:
> Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de> writes:
> 
> > For the function in the input file
> > 
> >   struct foo {};
> >   void bar (void (foo::*)(int) const, void (foo::*)(int)) {}
> > 
> > G++ snapshot 20010514 uses the mangled name
> > 
> >   _Z3barMK3fooFviEMS_FviE
> > 
> > I think this should be
> > 
> >   _Z3barMK3fooFviEMS_S1_
> 
> Err, the first would demangle to:
> bar(void (foo const::*)(int), void (foo::*)(int))
> The second, to
> bar(void (foo const::*)(int), void ()(int) foo::*)
> 
> Unless i'm on crack.

You're on crack,

MK<scopetype>F<return_type><p1><p2>...<pN>E

should demangle to

<return_type> (<scopetype>::*)(<p1>, <p2>, ..., <pN>) const

> Nope. The demangler agrees with me, so unless we are both wrong, they
> ain't the same.

Then the demangler is wrong, something I've reported LONG ago already
but nobody seems to have listened(?).

> Besides, the title implies you are trying to make the name smaller,
> yet you've only saved 1 byte here.

The point is that there is standard: every vendor should use the same
sheme.  If it has to be one thing it can't be the other, saving only
1 byte or not.

-- 
Carlo Wood <carlo@alinoe.com>


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