Dumb question: What IS a trigraph?
Steve Harrold
swh at hpcupt1.HP.COM
Fri Aug 18 01:02:16 AEST 1989
Re: Trigraphs
Poster suggests that trigraphs are not likely to be met in "everyday" C
code, but I'd like to caution you that they will show up in some very
unexpected ways.
For example, say you have a string literal in your code that reads something
like "...Are you sure you want to do this??.....". The inncocent pairing
of the two question marks will cause the Ansi-conformant compiler to hunt
for a trigraph. If the character immediately following the "??" completes
a legal trigraph, your string is no longer what you thought it was.
The compilation will succeed without comment, but your run-time results
may vary.
More information about the Comp.lang.c
mailing list