================
@@ -204,3 +204,50 @@ union PR4517_u {
 const union PR4517_u u1 = {4.0f};
 const union PR4517_u u2 = u1; // no-warning
 const union PR4517_u u3 = {u1.y}; // expected-error {{initializer element is 
not a compile-time constant}}
+
+int PR192471_1 = {{}, {}, {}}; // expected-warning {{too many braces around 
scalar initializer}} expected-warning {{excess elements in scalar initializer}}
+char PR192471_2[] = {
+    "1110",
+#embed __FILE__ // expected-warning {{#embed is a C23 extension}} \
+                   expected-warning {{excess elements in char array 
initializer}}
+};
+char PR192471_3[1] = {
+#embed __FILE__ limit(1) // expected-warning {{#embed is a C23 extension}}
----------------
Fznamznon wrote:

Thank you for adding embed tests! I think this PR is somehow related to excess 
braces though, so can we verify excess braces in the presence of #embed, like
https://godbolt.org/z/YEj4aKbo6
or something less fuzzer-like

https://github.com/llvm/llvm-project/pull/192471
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to