Skip to content
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

RULE-8-13: Consider possible macro false positives #775

Open
lcartey opened this issue Oct 22, 2024 · 0 comments
Open

RULE-8-13: Consider possible macro false positives #775

lcartey opened this issue Oct 22, 2024 · 0 comments
Labels
Difficulty-High A false positive or false negative report which is expected to take 1+ week effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Low Standard-MISRA-C

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 22, 2024

Affected rules

  • RULE-8-13

Description

Should we flag variables generated from macro expansions as missing const?

Some considerations:

  • Should we flag the macro itself, as that's where const would need to be added?
  • If so, should we only flag if the variable could be const in all instantiations of the macro?

Example

#define FOO int x = 0;

..
int f() {
  FOO; // NON_COMPLIANT?
  return x;
}
@lcartey lcartey added Difficulty-High A false positive or false negative report which is expected to take 1+ week effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Low labels Oct 22, 2024
@lcartey lcartey moved this from Reported to Triaged in Coding Standards Public Development Board Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-High A false positive or false negative report which is expected to take 1+ week effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Low Standard-MISRA-C
Projects
Development

No branches or pull requests

2 participants