...
Assuming your compiler implements the minimum requirements for signficant characters required by the standard, the following declaration consisting of four universal characters example is non-compliant.:
| Code Block |
|---|
extern int \U00010401\U00010401\U00010401\U00010401[100];
extern int \U00010401\U00010401\U00010401\U00010402[100];
|
In this example, both external identifiers consist of four universal characters but only the first three characters are unique. In practice, this means that both identifiers are referring to othe same integer array.
Compliant Solution
In the compliant solution, the signficant characters in each identifier vary.
| Code Block |
|---|
extern int \U00010401\U00010401\U00010401\U00010401[100]; extern int \U00010402\U00010401\U00010401\U00010401[100]; |
...
References
- ISO/IEC 9899-1999 5.2.4.1 Translation limits
- MISRA 04 Rule 3.5