This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: PATCH: New hook for custom-mangling of C++ scalars


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> Zack Weinberg <zack@codesourcery.com> writes:
>
> | > +  if (type == bool_char_type_node) return "U6__boolc";
> | > +  if (type == bool_short_type_node) return "U6__bools";
> | > +  if (type == pixel_type_node) return "u7__pixel";
> | > +  if (type == bool_int_type_node) return "U6__booli";
> | 
> | Encoding "bool X" as a "vendor-extended type qualifier" is a little
> | weird, IMHO, but I don't have a problem with it.  They demangle to
> | "<type> __bool" (owing to the weird C++ convention of writing type
> | qualifiers after the base type, contrary to English, but never mind) --
>
> I can't make sense of that.  Would you mind elaborating?

This is just me grumbling off on a tangent.  I think of type
qualifiers as adjectives, and the base type name as the noun.  English
puts adjectives before the noun.  So I find the style of putting the
type qualifiers after the base type name to be discordant.

> (still, "__bool int" and "int __bool" are curious notions).

Yeah, I'm not sure what they mean myself.  But they're written into
the Altivec API so we're stuck with them.

zw


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