Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined.

(See also undefined behavior 15 of Annex J.)

Further, according to section 6.4.2.1,

Any identifiers that differ in a significant character are different identifiers. If two identifiers differ only in nonsignificant characters, the behavior is undefined.

(See also undefined behavior 31 of Annex J.)

Identifiers in mutually visible scopes must be deemed unique by the compiler to prevent confusion about which variable or function is being referenced. Implementations can allow additional nonunique characters to be appended to the end of identifiers, making the identifiers appear unique while actually being indistinguishable.

...

Tool

Version

Checker

Description

LDRA tool suite

Include Page
LDRA_V
LDRA_V

17 D
355 S
61 X

Fully implemented.

Compass/ROSE

 

 

Can detect some violations of this rule. However, it cannot flag violations involving universal names.

PRQA QA·CQA-C
Include Page
PRQA_V
PRQA_V
 Partially implemented

...

ISO/IEC 9899:2011 Section 5.2.4.1, "Translation limits"

ISO/IEC TR 24772 "AJN Choice of filenames and other external identifiers" and "YOW Identifier name reuse"

MISRA Rules 5.1 and 8.9

 

...