Skip to content

[intro.defs], [dcl.attr.deprecated], [cpp.error] Define the term "warning" and use where appropriate #7893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9598,9 +9598,10 @@

\pnum
\recommended
Implementations should use the \tcode{deprecated} attribute to produce a diagnostic
message in case the program refers to a name or entity other than to declare it, after a
declaration that specifies the attribute. The diagnostic message should include the text provided
Implementations should use the \tcode{deprecated} attribute to produce a warning
in case the program refers to a name or entity other than to declare it, after a
declaration that specifies the attribute.
The warning should include the text provided
within the \grammarterm{attribute-argument-clause} of any \tcode{deprecated} attribute applied
to the name or entity.
The value of
Expand Down
12 changes: 12 additions & 0 deletions source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,18 @@
\tcode{false}.
\end{example}

\indexdefn{warning}%
\definition{warning}{defns.warning}
message belonging to a subset of
\termref{defns.diagnostic}{diagnostic message}{s}
produced to provide the user with information about the program,
not as a consequence of a \Cpp{} program being rejected

\begin{example}
The \tcode{#warning} directive produces a warning.
The \tcode{#error} directive produces a diagnostic message that is not a warning\iref{cpp.error}.
\end{example}

\indexdefn{program!well-formed}%
\definition{well-formed program}{defns.well.formed}
\Cpp{} program constructed according to the syntax and semantic rules
Expand Down
2 changes: 1 addition & 1 deletion source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@
\begin{ncsimplebnf}
\terminal{\# warning} \opt{pp-tokens} new-line
\end{ncsimplebnf}
requires the implementation to produce at least one diagnostic message
requires the implementation to produce at least one warning
for the preprocessing translation unit\iref{intro.compliance.general}.
\recommended
Any diagnostic message caused by either of these directives
Expand Down
Loading