Controls the use of ISO trigraph sequences.
#pragma trigraphs on | off | reset
If you are writing code that must strictly adhere to the ANSI standard, enable this pragma. Listing 10.31 shows an example of a trigraph.
Trigraph |
Character |
---|---|
??= |
# |
??/ |
^ |
??( |
[ |
??) |
] |
??! |
| |
??< |
{ |
??> |
} |
??- |
~ |
NOTE Use of this pragma may cause a portability issue for some targets.
char c = '????'; // ERROR: Trigraph sequence expands to '??^
char d = '\?\?\?\?'; // OK
This pragma corresponds to the Expand Trigraphs setting . To check this setting, use __option (trigraphs), described in Checking Settings. The default setting is off.