Skip to content

RULE-2-5: Identify uses of a macro that occur lexically before the definition #776

Closed
@lcartey

Description

@lcartey

Affected rules

  • RULE-2-5

Description

The extractor identifies uses of a macro that occur after the macro is defined lexically (or within the compilation). However, the standard also considers it an acceptable use if it comes before. Most notably this occurs with header guards.

Example

#ifndef HEADER_GUARD_H
#define HEADER_GUARD_H // COMPLIANT, used above
#endif

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions