Error during SonarScanner execution j: Unsupported value of __cplusplus macro: 202100L

Hi,
I get the following error for my CPP files during SonarScanner execution. I think it is a C++21. I am using sonar-scanner-cli-5.0.1.3006-windows. Is this C++21 support enabled.

ERROR: Error during SonarScanner execution
java.lang.UnsupportedOperationException: Unsupported value of __cplusplus macro: 202100L

How to work around this problem? Appreciate some help.

I solved temporarily by compiling my code with -std=gnu++20 compiler settings. Do we have any other options in SonarQube to resolve this other than compiler settings change?

Hi,

Welcome to the community!

What’s your version of SonarQube?

This is supported in SonarQube 10.5.

 
Ann

Thanks Ann, i will check on 10.5 version.

Prasad

1 Like