mangling example

Jim Dehnert dehnert at baalbek.engr.sgi.com
Sat Apr 8 04:00:17 UTC 2000


> From: Alain Miniussi <alainm at cup.hp.com>
> 
> I have a problem with a mangling example:
> 
> _Z5firstI3DuoEvS0_  -> first<Duo>(/*nondependent*/Duo)
> 
> If I understang correctly the mangling, we have:
> 
> <encoding>
>  <name> // potential source for substitution 1
>    <unqualified name>
>       <source name>"first"
>       <template-args>
>          <template arg>
>             <type> // potential source for substitution 2
>                <class-enum-type>
>                   <lass-enum-name>
>                      <source name>"Duo"
>  <bare-function-type>
>    <type> // potential source for substitution 3
>      <builtin type>"void"
>    <type>
>      <substitution>0 (ie, the second last encoded)
> 
>    
> So, at the point where S0_ appears:
> 
> S_ = void
> S0_ = first<Duo> (1)
> S1_ = Duo(2)
> 
> So I guess it should be _Z5firstI3DuoEvS1_, or
> did I missed something ?

I think you're right.

You raise another issue.  I believe that our intent was that
the candidates at this point include:

  S_	void
  S0_	first<Duo>
  S1_	Duo
  S2_	first

But I don't see the substitution of first in the grammar.
Is this what the others had in mind, too?

Jim

-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list