summaryrefslogtreecommitdiffstats
path: root/test/Sema/c89.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/c89.c')
-rw-r--r--test/Sema/c89.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index a410a62..b746d38 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -90,7 +90,7 @@ void test16() {
printg("Hello, world!\n"); /* expected-warning {{implicit declaration of function 'printg'}} */
}
-struct x { int x,y[]; }; /* expected-warning {{Flexible array members are a C99-specific feature}} */
+struct x { int x,y[]; }; /* expected-warning {{flexible array members are a C99 feature}} */
/* Duplicated type-qualifiers aren't allowed by C90 */
const const int c_i; /* expected-warning {{duplicate 'const' declaration specifier}} */
@@ -116,3 +116,12 @@ long long ll1 = /* expected-warning {{'long long' is an extension when C99 mode
unsigned long long ull1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
42ULL; /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
+struct Test17 { int a; };
+struct Test17 test17_aux(void);
+
+void test17(int v, int w) {
+ int a[2] = { v, w }; /* expected-warning {{initializer for aggregate is not a compile-time constant}} */
+ struct Test17 t0 = { v }; /* expected-warning {{initializer for aggregate is not a compile-time constant}} */
+ struct Test17 t1 = test17_aux(); /* this is allowed */
+}
+
OpenPOWER on IntegriCloud