15 lines · c
1// RUN: %clang_cc1 -Wunsafe-buffer-usage -fsafe-buffer-usage-suggestions \2// RUN: %s -verify %s3 4void gnu_stmtexpr_crash(void) {5 struct A {};6 struct B {7 struct A a;8 };9 10 struct B b = {{11 // This is a statement-expression (GNU extension).12 ({ int x; }) // no-crash // expected-warning{{excess elements in struct initializer}}13 }};14}15