================ @@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -std=c23 -verify %s + +/* WG14 N3006: Yes + * Underspecified object declarations + */ + +void struct_test(void) { + struct S1 { int x, y; }; // expected-note {{field 'x' has type 'int' here}} + + auto normal_struct = (struct S1){ 1, 2 }; + auto normal_struct2 = (struct S1) { .x = 1, .y = 2 }; + auto underspecified_struct = (struct S2 { int x, y; }){ 1, 2 }; + auto underspecified_struct_redef = (struct S1 { char x, y; }){ 'A', 'B'}; // expected-error {{type 'struct S1' has incompatible definitions}} \ ---------------- AaronBallman wrote:
Wow, that follow-on error is gross, there's not an array in sight! Nothing to be fixed for this PR though. https://github.com/llvm/llvm-project/pull/140911 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits