From 955800dcd6c0f62f71c48d828e674a4f805f9277 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Mon, 26 May 2025 20:42:18 +0200 Subject: [PATCH 1/2] [dcl.attr.deprecated], [cpp.error] Replace "diagnostic message" with "warning" --- source/declarations.tex | 7 ++++--- source/preprocessor.tex | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 2e575bbbba..c08374fbad 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -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 diff --git a/source/preprocessor.tex b/source/preprocessor.tex index ee7959abeb..8b91f30abc 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -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 From dc65ff3204de0a74e2448bbdf1bca8c5823c484c Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Mon, 26 May 2025 20:58:18 +0200 Subject: [PATCH 2/2] [intro.defs] Define "warning" --- source/intro.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/intro.tex b/source/intro.tex index 75705a2bab..62f7259047 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -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