[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Expand Trigraphs

(K&R, §A12.1) The C compiler lets you ignore trigraph characters. Many common character constants (especially on Mac OS) look like trigraph sequences, and this extension lets you use them without including escape characters.

If you're writing code that must follow the ANSI/ISO standard strictly, turn on the Expand Trigraphs option in the C/C++ Language Panel. If this option is on, be careful when you initialize strings or multi-character constants that contain question marks.


char c = '????';         // ERROR:  Trigraph sequence expands to '??^
char d = '\?\?\?\?';  // OK

The Expand Trigraphs option corresponds to the pragma trigraphs, To check whether this option is on, use __option (trigraphs). By default, this option is off.

See also "trigraphs" and "Checking Options."


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000