[clang] Correctly diagnose incomplete arrays with static storage in C (PR #134374)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 4 07:12:31 PDT 2025


================
@@ -3,16 +3,15 @@
 
 
 
-struct foo; // c-note 5 {{forward declaration of 'struct foo'}} \
+struct foo; // c-note 4 {{forward declaration of 'struct foo'}} \
                cxx-note 3 {{forward declaration of 'foo'}}
 
 void b;  // expected-error {{variable has incomplete type 'void'}}
 struct foo f; // c-error {{tentative definition has type 'struct foo' that is never completed}} \
                  cxx-error {{variable has incomplete type 'struct foo'}}
 
 static void c; // expected-error {{variable has incomplete type 'void'}}
-static struct foo g;  // c-warning {{tentative definition of variable with internal linkage has incomplete non-array type 'struct foo'}} \
----------------
Fznamznon wrote:

Why did this one disappear?

https://github.com/llvm/llvm-project/pull/134374


More information about the cfe-commits mailing list