diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-03-18 21:16:31 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-03-18 21:16:31 +0000 |
commit | ff8e21599213bbea6ccacecf2522ad19836c8fd1 (patch) | |
tree | 080d7b0817fada736ec3b580f8573b09cf4c52d1 /gcc/doc/extend.texi | |
parent | 16cc44407fe40e3411e206eeec60a14d20769ade (diff) | |
download | gcc-ff8e21599213bbea6ccacecf2522ad19836c8fd1.zip gcc-ff8e21599213bbea6ccacecf2522ad19836c8fd1.tar.gz gcc-ff8e21599213bbea6ccacecf2522ad19836c8fd1.tar.bz2 |
c-decl.c (grokfield): Don't allow typedefs for structures or unions with no tag by default.
* c-decl.c (grokfield): Don't allow typedefs for structures or
unions with no tag by default.
* doc/extend.texi (Unnamed Fields): Update.
testsuite:
* gcc.dg/c1x-anon-struct-1.c: Don't test use of typedefs.
* gcc.dg/c1x-anon-struct-3.c: New test.
* gcc.dg/anon-struct-11.c: Update.
From-SVN: r171170
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r-- | gcc/doc/extend.texi | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index eaad089..c897101 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -13352,12 +13352,11 @@ The compiler gives errors for such constructs. @opindex fms-extensions Unless @option{-fms-extensions} is used, the unnamed field must be a structure or union definition without a tag (for example, @samp{struct -@{ int a; @};}), or a @code{typedef} name for such a structure or -union. If @option{-fms-extensions} is used, the field may +@{ int a; @};}). If @option{-fms-extensions} is used, the field may also be a definition with a tag such as @samp{struct foo @{ int a; @};}, a reference to a previously defined structure or union such as @samp{struct foo;}, or a reference to a @code{typedef} name for a -previously defined structure or union type with a tag. +previously defined structure or union type. @opindex fplan9-extensions The option @option{-fplan9-extensions} enables |