[metadata]
id = "PRE07-C"
type = "recommendation"
category = "PRE"
number = 7
title = "Avoid using repeated question marks"
description = """
Two consecutive question marks signify the start of a trigraph sequence.
According to the C Standard, subclause 5.2.1.1 [ISO/IEC 9899:2011], In this
noncompliant code example,a++is not executed because the trigraph sequence??/is
replaced by\, logically puttinga++on the same line as the comment: // What is
the value of a now??/ a++;
"""
severity = "Low"
likelihood = "Unlikely"
priority = "P2"
level = "L3"
cert_version = "2016 Edition (Wiki)"
last_modified = "May 19, 2025"
[rules.cert_c.PRE07-C]
enabled = true
[references]
wiki = "https://wiki.sei.cmu.edu/confluence/display/c/PRE07-C.+Avoid+using+repeated+question+marks"