[clang] [Clang] Use ExtWarn for static local variable in extern inline function (fixes #39524) (PR #166332)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 27 07:10:56 PDT 2026


================
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c11 -pedantic-errors -verify %s
----------------
AaronBallman wrote:

This misunderstands the purpose of the issue -- we're accepting the code as an extension and the issue is that we're not correctly identifying it as an extension, so `-pedantic-errors` doesn't reject it. We want the diagnostic in all language modes.

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


More information about the cfe-commits mailing list