Unnamed Structure declaration

Jim Wilson wilson@specifixinc.com
Tue Mar 2 06:06:00 GMT 2004


Rob.McConnell@Zarlink.Com wrote:
> I'm a newbie here, so I hope this is the right ML to send this query to.

There is no need to send it to two mailing lists.  Just pick one. 
However, it is better to submit bug reports into our bugzilla bug 
database, as we don't track bugs reported by email.  See
     http://gcc.gnu.org/bugs.html
This is an easy one though.

> struct wibble {
>         int a;
> };
> struct wabble {
>     struct wibble;      /**** Compiler throws a wobbly here! ****/
>     int b;
> };

This isn't valid ISO C.  Some compilers support this as an extension to 
the ISO C standard, in partticular, the Microsoft compiler does.

Gcc supported this by default for a while, but there were some issues 
with it, so nowadays gcc only supports this if you use the 
-fms-extensions option.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list