This is the mail archive of the gcc@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: Should typedef'd unnamed structs be supported?


* Richard Henderson (rth at redhat dot com) [20030327 02:53]:

>          If this is something of the form "foo;" and foo is a TYPE_DECL, then
>            If MS extensions are enabled and foo names a structure, then
>              again this is an anonymous struct.
>            Otherwise this is an error.

And here's the catch: in 3.3 and mainline this only gives a warning when
it's a declaration. You only get an error if you try to access such a
member. If the comment is correct, gcc actually should flag this as error
and not only a warning.

> Though you should note that none of this abomination is active
> unless -fms-extensions.

Sadly that's only true for 3.3 and up :( 3.2 accepts it without that switch 
and that's why the ntfs driver developers seemingly decided to use it.

See c/10225 for the gory details.

> Nor is it documented, though I suppose that's a mistake.

Yes, I also think that this is mistake. I'll see if I can come up with
something. BTW, from which file does the comment come from?

Philipp

-- 
Philipp Thomas <pthomas at suse dot de>
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany


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