Skip to content

Commit 3443f02

Browse files
authored
Merge 2022-07 CWG Motion 5
P2437R1 Support for #warning
2 parents 0fd78ac + 1de58fc commit 3443f02

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

source/preprocessor.tex

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
\terminal{\# undef } identifier new-line\br
5757
\terminal{\# line } pp-tokens new-line\br
5858
\terminal{\# error } \opt{pp-tokens} new-line\br
59+
\terminal{\# warning} \opt{pp-tokens} new-line\br
5960
\terminal{\# pragma } \opt{pp-tokens} new-line\br
6061
\terminal{\# }new-line
6162
\end{bnf}
@@ -1603,18 +1604,21 @@
16031604
one of the two previous forms, the behavior is undefined;
16041605
otherwise, the result is processed as appropriate.
16051606

1606-
\rSec1[cpp.error]{Error directive}%
1607+
\rSec1[cpp.error]{Diagnostic directives}%
16071608
\indextext{preprocessing directive!error}%
1609+
\indextext{preprocessing directive!diagnostic}%
1610+
\indextext{preprocessing directive!warning}%
16081611
\indextext{\idxcode{\#error}|see{preprocessing directive, error}}
16091612

16101613
\pnum
1611-
A preprocessing directive of the form
1614+
A preprocessing directive of either of the following forms
16121615
\begin{ncsimplebnf}
1613-
\terminal{\# error} \opt{pp-tokens} new-line
1616+
\terminal{\# error} \opt{pp-tokens} new-line\br
1617+
\terminal{\# warning} \opt{pp-tokens} new-line
16141618
\end{ncsimplebnf}
16151619
causes the implementation to produce
1616-
a diagnostic message that should include the specified sequence of preprocessing tokens,
1617-
and renders the program ill-formed.
1620+
a diagnostic message that should include the specified sequence of preprocessing tokens;
1621+
the \tcode{\# error} directive renders the program ill-formed.
16181622

16191623
\rSec1[cpp.pragma]{Pragma directive}%
16201624
\indextext{preprocessing directive!pragma}%

0 commit comments

Comments
 (0)