Versions Compared

Key

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

...

Restriction of the significance of an external name to fewer than 255 characters in the standard (considering each universal character name or extended source character as a single character) is an obsolescent feature that is a concession to existing implementations. As a result, it is not necessary to comply with this restriction, as long as the identifiers are unique and the assumptions concerning the number of significant characters are documented.

Non-Compliant Code Example (

...

Source Character Set)

On implementations that support only the minimum requirements for significant characters required by the standard, the following example is non-compliant because the first 31 characters of the external identifiers are identical:

Code Block
bgColor#FFcccc
extern int global_symbol_definition_lookup_table_a[100];
extern int global_symbol_definition_lookup_table_b[100];

Compliant Solution (

...

Source Character Set)

In a compliant solution, the significant characters in each identifier must differ.

Code Block
bgColor#ccccff
extern int a_global_symbol_definition_lookup_table[100];
extern int b_global_symbol_definition_lookup_table[100];

Non-Compliant Code Example (

...

Universal Characters)

In the following non-compliant code example, both external identifiers consist of four universal characters. Because the first three universal characters of each identifier are identical, both identify the same integer array.

Code Block
bgColor#FFcccc
extern int \U00010401\U00010401\U00010401\U00010401[100];
extern int \U00010401\U00010401\U00010401\U00010402[100];

Compliant Solution (

...

Universal Characters)

For portability, the first three universal character combination used in an identifier must be unique.

...