ParssingError for struct definition

I am using a C/C+ build wrapper for a TI F28xx DSP.
I have the following definitions:

typedef int                 int16;
typedef long                int32;
typedef long long           int64;
typedef unsigned int        Uint16;
typedef unsigned long       Uint32;
typedef unsigned long long  Uint64;
typedef float               float32;
typedef long double         float64;
struct ADCTRL1_BITS {     // bits  description
    Uint16  rsvd1:4;      // 3:0   reserved
    Uint16  SEQ_CASC:1;   // 4     Cascaded sequencer mode
    Uint16  SEQ_OVRD:1;   // 5     Sequencer override 
    Uint16  CONT_RUN:1;   // 6     Continuous run
    Uint16  CPS:1;        // 7     ADC core clock pre-scalar
    Uint16  ACQ_PS:4;     // 11:8  Acquisition window size
    Uint16  SUSMOD:2;     // 13:12 Emulation suspend mode
    Uint16  RESET:1;      // 14    ADC reset
    Uint16  rsvd2:1;      // 15    reserved
};

I have the ParsingError:

DEBUG: [ParsingError] C:\..../DSP2833x_Adc.h:41 named bit-field 'rsvd1' has zero width

As if the struct definition was not recognized.
What is the issue?

Hey there.

As asked for in the template post, what version of SonarQube are you using?

In my log i have SonarScanner 4.6.2.2472 and SonarQube server 9.9.0.65466

7:16:33.233 INFO: Scanner configuration file: C:\MEMS_DOCUMENTS_PROCEDURES\SONARQUBE\sonar-scanner-4.6.2.2472-windows\bin..\conf\sonar-scanner.properties
17:16:33.237 INFO: Project root configuration file: NONE
17:16:33.255 INFO: SonarScanner 4.6.2.2472
17:16:33.255 INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
17:16:33.255 INFO: Windows 10 10.0 amd64
17:16:33.356 DEBUG: keyStore is :
17:16:33.356 DEBUG: keyStore type is : pkcs12
17:16:33.356 DEBUG: keyStore provider is :
17:16:33.356 DEBUG: init keystore
17:16:33.356 DEBUG: init keymanager of type SunX509
17:16:33.591 DEBUG: Create: C:\Users\shoareau.sonar\cache
17:16:33.592 INFO: User cache: C:\Users\shoareau.sonar\cache
17:16:33.592 DEBUG: Create: C:\Users\shoareau.sonar\cache_tmp
17:16:33.593 DEBUG: Extract sonar-scanner-api-batch in temp…
17:16:33.596 DEBUG: Get bootstrap index…
17:16:33.596 DEBUG: Download: https://sonarqube.slb.com/batch/index
17:16:33.880 DEBUG: Get bootstrap completed
17:16:33.885 DEBUG: Create isolated classloader…
17:16:33.942 DEBUG: Start temp cleaning…
17:16:33.947 DEBUG: Temp cleaning done
17:16:33.948 INFO: Scanner configuration file: C:\MEMS_DOCUMENTS_PROCEDURES\SONARQUBE\sonar-scanner-4.6.2.2472-windows\bin..\conf\sonar-scanner.properties
17:16:33.948 INFO: Project root configuration file: NONE
17:16:33.949 DEBUG: Execution getVersion
17:16:33.961 INFO: Analyzing on SonarQube server 9.9.0.65466
17:16:33.961 INFO: Default locale: “en_US”, source code encoding: “UTF-8”
17:16:33.961 DEBUG: Work directory: C:\MEMS_DOCUMENTS_PROCEDURES\DVJPG_EPS_Download_like_Fiso.scannerwork
17:16:33.961 DEBUG: Execution execute
17:16:34.327 DEBUG: Enterprise 9.9.0.65466
17:16:34.502 INFO: Load global settings

sonar-cfamily-reproducer.zip (90.7 KB)
Here is the log i can provide.

The sonar scanner script crashes

: Requesting reproducer for: C:\MEMS_DOCUMENTS_PROCEDURES\DVJPG_EPS_Download_like_Fiso\phase3\fe_dhs\dev28335\FLCN\Main\CANSlaveController\FisoSlaves\fiso_cop\source\fiso_cop_node_info.c
14:24:49.140 ERROR: Exception in thread pool-2-thread-10…

It looks like you’re using an old version of the build wrapper (6.20) instead of the one matching your SonarQube instance (6.41)

Please download the matching version from the server
  https://sonarqube.slb.com/static/cpp/build-wrapper-win-x86.zip

And after using this, see if the issue persists?

Hello,
I updated the buildwrapper to 6.41 , but the same issue occurs.
HOw can i go further to solve and understand the issue?

The issue is that the scanner fails with and exception
I just put the extract of the log.

Thank you

analysis.log (43.3 KB)
sonar-cfamily.reproducer (77.2 KB)

Hello @shoareau,

I see the compiler you use is from 2015, and when probed it does not generate a predefined list for the size of primitive types (i.e. #define __SIZEOF_LONG__). These are needed for the analyzer to know what size these types have and treat them accordingly. Since they are missing, the parser will have trouble in places where it needs to know their size, alignment, padding, etc.

Would it be possible to use a more recent version of the compiler, at least when running the build with build-wrapper?

Edited to clarify.

Thank you for the feedback.
Regarding the build-wrapper, i used the link that was given to me:
https://sonarqube.slb.com/static/cpp/build-wrapper-win-x86.zip

How can i check a recent build wrapper?

thank you

I meant a more recent cl2000.exe compiler. The build wrapper is OK.