-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #13615: False positive: Misra C 17.3: UINT32_C #7276
base: main
Are you sure you want to change the base?
Conversation
FYI We used to replace these macros but they were removed a while ago and need to be re-added. |
@firewave we need to keep UINT32_C in some way for misra. For instance the code The Misra checker for rule 7.5 could in theory use the "raw tokens" instead but that means that violations in headers are not detected and there could also be false negatives when macros is used. So for the sake of Misra I would suggest that we don't replace UINT32_C. Or do you think there is some better replacement that will still mean we can detect misra violations properly? |
I am saying that if we would add something like this:
Then the dumpfile will not contain the necessary information. If the code is |
Right because those are just replacements and are not treated as macros. Maybe that should be changed. But as you noted in the past |
I am not sure how to implement that. How about this define:
If the code says |
It should no different from the existing defines we already generate. But these should be flagged as non-internal ones. That is a feature we need to implement in simplecpp first. And it is probably not important. |
No description provided.