15 Preprocessing directives [cpp]

15.8 Diagnostic directives [cpp.error]

A preprocessing directive of the form
# error pp-tokens new-line
renders the program ill-formed.
A preprocessing directive of the form
# warning pp-tokens new-line
requires the implementation to produce at least one diagnostic message for the preprocessing translation unit ([intro.compliance.general]).
Recommended practice: Any diagnostic message caused by either of these directives should include the specified sequence of preprocessing tokens.