During analysis of my C++ code I get:
java.lang.UnsupportedOperationException: Unsupported value of __cplusplus macro: 202400L
at com.sonar.cpp.analyzer.StdFlags.fromCppMacrosWithoutConditionalFeatures(StdFlags.java:66)
at com.sonar.cpp.analyzer.ClangDriver.onCapture(ClangDriver.java:666)
at com.sonar.cpp.analyzer.CompilerDrivers.onCapture(CompilerDrivers.java:47)
...
We’re using latest Clang and just enabled C++26 to be able to use pack indexing (P2662R3).
While we could switch back temporarily and workaround by using much more verbose C++23 compatible code and leave a task in our bug tracker for the future, I would very much prefer not to.
Is there an easy way to ignore this error and ignore files where SonarQube actually encounters issues due to unsupported syntax?
In reality only a few files actually use C++26 features as of yet and it’d be fine enough to have those ignored. But language standard selection is project-wide without a decent bit of build system hacking so I’d prefer to avoid that too.
Using Developer Edition v2025.5 (113872).