30 lines
1.1 KiB
Markdown
30 lines
1.1 KiB
Markdown
[cpp.error]
|
||
|
||
# 15 Preprocessing directives [[cpp]](./#cpp)
|
||
|
||
## 15.9 Diagnostic directives [cpp.error]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2126)
|
||
|
||
A preprocessing directive of the form
|
||
|
||
# error [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1 Preamble [cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1 Preamble [cpp.pre]")
|
||
|
||
renders the program ill-formed[.](#1.sentence-1)
|
||
|
||
A preprocessing directive of the form
|
||
|
||
# warning [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1 Preamble [cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1 Preamble [cpp.pre]")
|
||
|
||
requires the implementation to produce at least one diagnostic message
|
||
for the preprocessing translation unit ([[intro.compliance.general]](intro.compliance.general "4.1.1 General"))[.](#1.sentence-2)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2139)
|
||
|
||
*Recommended practice*: Any diagnostic message caused by either of these directives
|
||
should include the specified sequence of preprocessing tokens[.](#2.sentence-1)
|