[clang] [C23] [Diagnostics] No longer warn with -Wc++98-compat when using constexpr in C23 (PR #199537)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 25 08:29:07 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 54018 tests passed
* 1259 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Parser/c23-constexpr.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fsyntax-only -verify=c23 -std=c23 C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c -Wpre-c2x-compat
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fsyntax-only -verify=c23 -std=c23 'C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c' -Wpre-c2x-compat
# .---command stderr------------
# | error: 'c23-warning' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 4: 'constexpr' is incompatible with C standards before C23
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 10: 'constexpr' is incompatible with C standards before C23
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 14: 'constexpr' is incompatible with C standards before C23
# | error: 'c23-warning' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 4: 'constexpr' specifier is incompatible with C standards before C23
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 10: 'constexpr' specifier is incompatible with C standards before C23
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\c23-constexpr.c Line 14: 'constexpr' specifier is incompatible with C standards before C23
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/199537
More information about the cfe-commits
mailing list