This is the mail archive of the 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

Zack Weinberg <> writes:

| Gabriel Dos Reis <> writes:
| > Zack Weinberg <> 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.

"type qualifiers" are what C++ calls cv-qualifiers.  If you look at
the C++ standard text, the coding style nearly exclusively uses "cv T"
where "cv" is a cv-qualifier (or type qualifier in C terminology).
So, I can't see what is going on in your grambling... 

(That coding style used in the C++ standard text is not universally
used however, but it is by far vastly widespread).

-- Gaby

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