This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mangle question
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: Mangle question
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Mon, 28 Aug 2000 18:50:35 -0700 (PDT)
- cc: carlo at alinoe dot com, gcc at gcc dot gnu dot org
>
> 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...
>