"Doug Gregor" <[EMAIL PROTECTED]> writes:
| On 11/8/06, Mike Stump <[EMAIL PROTECTED]> wrote:
| > On Nov 7, 2006, at 7:13 PM, Doug Gregor wrote:
| > > Now, how much do we worry about the fact that we won't be printing
| > > typedef names
| >
| > The only potential language gotcha I can think of is:
| >
| > 5 If the typedef declaration defines an unnamed class (or enum), the
| > first typedef-name declared by the declaration to be that class
| > type
| > (or enum type) is used to denote the class type (or enum type)
| > for
| > linkage purposes only (_basic.link_). [Example:
| > typedef struct { } *ps, S; // S is the class name for linkage
| > purposes
| > --end example]
| >
| > we still gotta get that right. I think this just changes the
| > underlying type and doesn't have any typedef bits to it.
|
| Right. If we want to remember that the struct { } was originally
| anonymous, we could just set a flag on the RECORD_TYPE.
In our implementation, each class-type has a canonical type -- the
real class-name in most cases. For the case above, we use the typedef
name as the class-name (as granted by the C++ standard, quoted above).
The canonical type, in our implementation, is the "morally equivalent"
of GCC's RECORD_TYPE or UNION_TYPE.
-- Gaby