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: Mangle question


> 
> Makes sense to me, but that's maybe because I'm the one that thought
> it up.  :-) See, back a long time ago, there was a problem handling
> more than about 9 somethings.  And the mangling format, was a single
> decimal digit indicating how many of them there were.  The compiler
> generated them this way and the demangler and friends ate just one
> digit.  Then a customer had a testcase with 12 or so of them.  By have
> it done this way, we preserve backward and forwards compatibility for
> 99% of the code (<10 of something), and by having _[0-9]+/[^0-9] for
> the new case, we then can have any number (literally) of somethings
> going forward.
> 

Except it's been proven it's ambiguous in the present of underscored names.

We now iterate through until the first valid "parse" of the mangled name
is found.


>
If the code wasn't broken from the start and if compatibility wasn't a
> concern, there'd be no need to do this.
> 
> Hope you liked the story...
> 


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