summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/array-init.c
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2013-06-08 13:29:58 +0000
committerSerge Pavlov <sepavloff@gmail.com>2013-06-08 13:29:58 +0000
commit89578fd4398130e24bf44e805f8f9688f72be7e1 (patch)
tree7869f1c400cd3d1f1d8a2c6a442cf5b602ea1c2b /clang/test/Sema/array-init.c
parentea7bb570580d1a82c8654d0ee3ce6b0a4419a35b (diff)
downloadbcm5719-llvm-89578fd4398130e24bf44e805f8f9688f72be7e1.tar.gz
bcm5719-llvm-89578fd4398130e24bf44e805f8f9688f72be7e1.zip
Recognition of empty structures and unions is moved to semantic stage
Differential Revision: http://llvm-reviews.chandlerc.com/D586 llvm-svn: 183609
Diffstat (limited to 'clang/test/Sema/array-init.c')
-rw-r--r--clang/test/Sema/array-init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index f92852f341b..ae2c7425662 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -226,7 +226,8 @@ void emptyInit() {struct {} x[] = {6};} //expected-warning{{empty struct is a GN
// expected-error{{initializer for aggregate with no elements}}
void noNamedInit() {
- struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no elements}}
+ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no elements}} \
+// expected-warning {{struct without named members is a GNU extension}}
}
struct {int a; int:5;} noNamedImplicit[] = {1,2,3};
int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1];
OpenPOWER on IntegriCloud