C++ ABI: Substitutions and Vendor-Encoded Types

Jim Dehnert dehnert at baalbek.engr.sgi.com
Sat Nov 11 05:18:45 UTC 2000


We discussed this in the meeting yesterday.  Note that the grammar is
correct (and matches the description) if the vendor extended qualifier
is analogous to "pointer to" and doesn't match the description if it is
analogous to "const."  We considered the possibility of extending the
grammar to deal with both separately, and decided that it was not
worthwhile for something with no current examples.  I've added a note
to the document explaining that this situation exists and that a vendor
adding a const-like qualifier will need to make appropriate
adjustments.

Thanks for pointing this out,
Jim

> From: Jeffrey Oldham <oldham at codesourcery.com>
> 
> 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
> 
-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list