diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-18 21:16:31 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-18 21:16:31 +0000 |
commit | 9b280b352c3d5137cd09699d8cc6f64fa8cb4adb (patch) | |
tree | 080d7b0817fada736ec3b580f8573b09cf4c52d1 /gcc/testsuite/gcc.dg/anon-struct-11.c | |
parent | c3fa352fba8c0acb3d505b744bdb630a65329463 (diff) | |
download | gcc-9b280b352c3d5137cd09699d8cc6f64fa8cb4adb.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/anon-struct-11.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/anon-struct-11.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/anon-struct-11.c b/gcc/testsuite/gcc.dg/anon-struct-11.c index 1084e5bded6..c2f85fc24e4 100644 --- a/gcc/testsuite/gcc.dg/anon-struct-11.c +++ b/gcc/testsuite/gcc.dg/anon-struct-11.c @@ -50,7 +50,7 @@ struct E { struct F { char f; }; /* { dg-warning "does not declare anything" } */ char c; union { - D; + D; /* { dg-warning "does not declare anything" } */ }; char e; }; @@ -85,7 +85,7 @@ test2 (void) e.e = 5; f2 (&e); /* { dg-warning "incompatible pointer type" } */ f3 (&e); /* { dg-warning "incompatible pointer type" } */ - if (e.d != 4) + if (e.d != 4) /* { dg-error "no member" } */ abort (); if (e.f != 6) /* { dg-error "no member" } */ abort (); |