Debian Codegraph @

clang/test/C/C2y/n3341.c

raw
1 // RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic %s
2 // RUN: %clang_cc1 -verify=gnu -Wall -pedantic %s
3
4 /* WG14 N3341: Yes
5 * Slay Some Earthly Demons III
6 *
7 * Empty structure and union objects are now implementation-defined.
8 */
9
10 // expected-no-diagnostics
11
12 struct R {}; // gnu-warning {{empty struct is a GNU extension}}
13 #if __STDC_VERSION__ >= 201112L
14 struct S { struct { }; }; // gnu-warning {{empty struct is a GNU extension}}
15 #endif
16 struct T { int : 0; }; // gnu-warning {{struct without named members is a GNU extension}}
17 union U {}; // gnu-warning {{empty union is a GNU extension}}
18