19 lines · c
1// RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic %s2// RUN: %clang_cc1 -verify=gnu -Wall -pedantic %s3 4/* WG14 N3341: Yes5 * Slay Some Earthly Demons III6 *7 * Empty structure and union objects are now implementation-defined.8 */9 10// expected-no-diagnostics11 12struct R {}; // gnu-warning {{empty struct is a GNU extension}}13#if __STDC_VERSION__ >= 201112L14struct S { struct { }; }; // gnu-warning {{empty struct is a GNU extension}}15#endif16struct T { int : 0; }; // gnu-warning {{struct without named members is a GNU extension}}17union U {}; // gnu-warning {{empty union is a GNU extension}}18 19