C++ ABI: Substitutions and Vendor-Encoded Types

Jeffrey Oldham oldham at codesourcery.com
Mon Oct 23 23:48:56 UTC 2000


Section 5.1.5 of the C++ ABI states

    <type> ::= <substitution>
	   ::= U <source-name> <type>     # vendor extended type qualifier
	   ...

    For purposes of substitution, given a CV-qualified type, the base type
    is substitutible, and the type with all the C, V, and r qualifiers
    plus any vendor extended types in the same order-insensitive set is
    substitutible; any types with a subset of those qualifiers is
    not. That is, given a type const volatile foo, the fully qualified
    type or foo may be substituted, but not const foo.

Which is correct, the grammar xor the text?  The grammar indicates
that 

     U 3foo U 3bar <type>

should be parsed and <type>, bar <type>, and foo bar <type> should be
placed in the substitution dictionary.  The text implies the middle
case should be omitted.  Which is right?  Should vendor-extended
qualifiers be merged with CV-qualifiers to form qualifiers to avoid
this difficulty?

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the cxx-abi-dev mailing list