...
All occurrences in a source file of the following sequences of three characters (ie. that is, trigraph sequences) are replaced with the corresponding single character.
??=
#
??)
]
??!
|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="46153b6320a2dab9-4246a3c1-41944ae9-8a6fad75-585f1cd2a42487e1bd7baaf9"><ac:plain-text-body><![CDATA[
??(
[
??'
^
??>
}
]]></ac:plain-text-body></ac:structured-macro>
??/
\
??<
{
??-
~
Non-
...
Compliant Code Example
In this non-compliant code example, a++
is not executed, as the trigraph sequence ??/
is replaced by \,
logically putting a++
on the same line as the comment.
...
Code Block | ||
---|---|---|
| ||
/* what is the value of a now */ a++; |
Non-
...
Compliant Code Example
This non-compliant code has the trigraph sequence of ??!
included, which is replaced by the character |
.
...
The above code prints out Over 9000!|
if a C99 Compliant -compliant compiler is used.
Compliant Solution
The compliant solution uses string concatenation to place the two question marks together, as since they will be interpreted as beginning a trigraph sequence otherwise.
...