5.2.1.1 Trigraph sequences

1

Before any other processing takes place, each occurrence of one of the following sequences of three characters (called trigraph sequences[1]) is replaced with the corresponding single character.

??= ↦ # ??) ↦ ] ??! ↦ |

??( ↦ [ ??’ ↦ ^ ??> ↦ }

??/ ↦ ` :syn-term:??< ↦ {` ??- ↦ ~

No other trigraph sequences exist. Each ? that does not begin one of the trigraphs listed above is not changed.

2

EXAMPLE 1

??=define arraycheck(a, b) a??(b??) ??!??! b??(a??)

becomes

#define arraycheck(a, b) a[b] || b[a]

3

EXAMPLE 2 The following source line

printf("Eh???/n");

becomes (after replacement of the trigraph sequence ??/)

printf("Eh?\n");

Footnotes