-
- Downloads
c-decl.c (grokfield): Allow typedefs for anonymous structs and unions by default if...
* c-decl.c (grokfield): Allow typedefs for anonymous structs and unions by default if those structs and unions have no tags. Do not condition anonymous struct and unions handling on flag_iso. Allow anonymous structs and unions for C1X. (finish_struct): Do not diagnose lack of named fields when anonymous structs and unions present for C1X. Accept flexible array members in structure with anonymous structs or unions but no directly named fields. * doc/extend.texi (Unnamed Fields): Update. testsuite: * gcc.dg/c1x-anon-struct-1.c, gcc.dg/c1x-anon-struct-2.c, gcc.dg/c90-anon-struct-1.c, gcc.dg/c99-anon-struct-1.c: New tests. * gcc.dg/20080820.c, gcc.dg/anon-struct-1.c: Update expected diagnostics and type sizes. From-SVN: r159439
Showing
- gcc/ChangeLog 12 additions, 0 deletionsgcc/ChangeLog
- gcc/c-decl.c 24 additions, 9 deletionsgcc/c-decl.c
- gcc/doc/extend.texi 5 additions, 3 deletionsgcc/doc/extend.texi
- gcc/testsuite/ChangeLog 7 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/20080820.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/20080820.c
- gcc/testsuite/gcc.dg/anon-struct-1.c 5 additions, 5 deletionsgcc/testsuite/gcc.dg/anon-struct-1.c
- gcc/testsuite/gcc.dg/c1x-anon-struct-1.c 73 additions, 0 deletionsgcc/testsuite/gcc.dg/c1x-anon-struct-1.c
- gcc/testsuite/gcc.dg/c1x-anon-struct-2.c 57 additions, 0 deletionsgcc/testsuite/gcc.dg/c1x-anon-struct-2.c
- gcc/testsuite/gcc.dg/c90-anon-struct-1.c 12 additions, 0 deletionsgcc/testsuite/gcc.dg/c90-anon-struct-1.c
- gcc/testsuite/gcc.dg/c99-anon-struct-1.c 12 additions, 0 deletionsgcc/testsuite/gcc.dg/c99-anon-struct-1.c
Loading
Please register or sign in to comment