Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to address Impact-Low Standard-MISRA-C false positive/false negativeAn issue related to observed false positives or false negatives.
@lcartey

Description

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to address Impact-Low Standard-MISRA-C false positive/false negativeAn issue related to observed false positives or false negatives.

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /