================ @@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, LangOpts.CPlusPlus23 ? "202211L" : LangOpts.CPlusPlus17 ? "201603L" : "200907"); - Builder.defineMacro("__cpp_static_assert", LangOpts.CPlusPlus26 ? "202306L" - : LangOpts.CPlusPlus17 - ? "201411L" - : "200410"); + // C++17 / C++26 static_assert backported + Builder.defineMacro("__cpp_static_assert", "202306L"); ---------------- AaronBallman wrote:
I agree with @cor3ntin -- pedantic errors and feature testing are a wider concern; in addition to #77262 we also have #84372 which is a similar problem but with `__has_extension` and pedantic errors. In your example, the user is getting precisely what they asked for and I don't see the issue. They explicitly opt in to diagnostics about code that uses extensions in C++14 mode, so the diagnostic warning is expected. And they explicitly opt to make all warnings be errors, so upgrading the warning to an error is expected. https://github.com/llvm/llvm-project/pull/102044 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits