[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / clang / test / C / C99 / n782.c
blobd147fd6fb1a1a22df318451e1592f44d1a20baf9
1 /* RUN: %clang_cc1 -verify -std=c99 -pedantic %s
2 RUN: %clang_cc1 -verify=c89 -std=c89 -pedantic %s
3 expected-no-diagnostics
4 */
6 /* WG14 N782: Clang 3.4
7 * Relaxed constraints on aggregate and union initialization
8 */
10 void test(void) {
11 struct S {
12 int x, y;
14 int a = 1, b = 2;
15 struct S s = { a, b }; /* c89-warning {{initializer for aggregate is not a compile-time constant}} */
17 union U {
18 int x;
19 float f;
21 union U u = { a }; /* c89-warning {{initializer for aggregate is not a compile-time constant}} */