Please close this issue. I did a few more searches on this community and found an issue https://jira.sonarsource.com/browse/CPP-2126 that was linked to the GCC compiler I use. I did the sonar scanner update and this fixed the issue.
1 Like