Why the bug number are different when the compiler is changed?

Hi Sirs:
We use sonar-scanner to scan some code.
If the compiler is GCC7.3.1 and use build wrapper to build it and scan, there are 27 bugs.
However, if we use GCC8.3.1 to repeat the same things and the bug is 0!
Is it reasonable?

Thanks.

Fred

Hi @fredchienftc ,

this information is not enough to say if it is reasonable or not.

You should share what version of SonarQube you are using and the sonar-scanner log files in debug mode of the two analyses, that may help us to see if the configuration is correct at least.

Hi Massimo:
Thanks for your feedback.
The version info:

  • Developer Edition
  • Version 9.6.1 (build 59531)
    We will offer the debug log of scanner later.

Fred

1 Like

Hi @fredchienftc ,

did you manage to get the logs or understand the difference?

Hi Massimo:
Sorry that we can duplicate the log again.
Please ignore this issue temporarily.
AS we knew, the Sonarqube rule is independent with the compiler type, is it correct?
Thanks.

Hi @fredchienftc ,

sorry for the late reply.

the analysis results can differ from one compiler to another, especially if they have different targets. I don’t know what rules you are talking about so it is different to answer with the few information I currently have.