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: C++ PATCH: Fix PR 13275


Richard Henderson <rth@redhat.com> writes:

| > I don't see anything in the C standard to say that offsetof needs to work
| > for anything other than a simple member of the specified structure type.  
| 
| I don't see a definition of "member-designator" anywhere, other than
| "&t.<member-designator>" must be valid.  I'd think this is similar to
| your argument that something other than a simple type tag can be used
| as the first argument of offsetof.

Interesting :-)

I would think that "member-designator" is a "designator" of a member
of an aggregate, and I would use the standard production rule

               designator:
                       [ constant-expr ]
                       . identifier

-- Gaby


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