This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Anon structs in gcc-3.3.1 [Was: Re: Available for testing: gcc-3.3.1-1 ...]
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: cygwin at cygwin dot com
- Date: Sun, 21 Sep 2003 09:31:18 +1000 (EST)
- Subject: Anon structs in gcc-3.3.1 [Was: Re: Available for testing: gcc-3.3.1-1 ...]
Serge wrote
> Hallo Christopher,
>
>The support for unnamed structure/union is brocken!
>
>The warning only (-Wall) is generated and corresponding field is ignored!
>
>The old GCC compiler (before 2.95.3 if I not mistake) reports the error.
>
>In the previous 2.95.3 .. 3.2 and in the current GCC shipped with CYGWIN it was supported
properly.
What has changed is that unamed struct/unions are now not supported in ISO C mode
(-ansi (r -std=c89 switch is given). Apparently there are two levels of
support for these extenions. With -std=gnu89 (default). the GNU extemsions supported
in prior gcc is still supported. With -fms-extensions, some additional MS
extensions are also supported. Regardless of the commandline switch. I think
you can still mark structs/unions with __extension__ to get the std-gnu89 anon support
for a specific declaration. I can't find where this is documented.
These are testsuite cases (in source distro) that give examples
gcc.dg/anon-struct-1.c
gcc.dg/anon-struct-2.c
gcc.dg/anon-struct-3.c
gcc.dg/20011008-1.c
gcc.dg/20020527-1.c
Plus more in C++ dirs
Danny
>
>Sergey
>
http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/