On Nov 5, 2010, at 3:49 AM, Abramo Bagnara wrote:

> Il 05/11/2010 08:21, John McCall ha scritto:
> 
>> For top-level anonymous structs or unions, the first declaration in a 
>> NestedFieldDecl's chain would be a VarDecl;  otherwise it would be a 
>> FieldDecl.  In all cases, all the remaining decls would be FieldDecls.
> 
> It is not clear to me in which cases you get a VarDecl... isn't it
> always the FieldDecl of an anonymous variable?

The first declaration of the chain is the implicitly-generated variable or 
field for the outermost anonymous struct/union itself. For example, if I have:

        void f() {
                union {
                        double real;
                        int integer;
                };
        }

the anonymous union is represented by a VarDecl.

        - Doug


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to