...
All occurrences in a source file of the following sequences of three characters (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="49ca239b621dc80f-9b185c6a-4fc04d8e-9cc1a166-da264e4725426e8ba99f9e8a"><ac:plain-text-body><![CDATA[
??(
[
??'
^
??>
}
]]></ac:plain-text-body></ac:structured-macro>
??/
\
??<
{
??-
~
...
The above code prints Over 9000!??!
, as intended.
Implementation Details
Risk Assessment
Inadvertent trigraphs can lead to unexpected behavior. Some compilers provide options to warn when trigraphs are encountered, or to disable trigraph expansion. Use the warning options and ensure your code compiles cleanly (see MSC00-A. Compile cleanly at high warning levels)
...
.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
PRE07-A | 1 (low) | 1 (unlikely) | 2 (medium) | P2 | L3 |
...