Closed Eisenwave closed 3 months ago
Note that I think that the intention of "implementation-defined subset" in [defns.diagnostic] is to say that informative messages or notes which are output aren't considered diagnostics; not to establish that only a subset of warnings or errors is a diagnostic.
It would mean that any implementation has to meticulously document which warning and error message is a diagnostic and which isn't, instead of being able to say that "warnings are diagnostics".
Reflector thread https://lists.isocpp.org/core/2022/01/11929.php
CWG2810
Reflector thread: https://lists.isocpp.org/core/2022/01/11929.php
Reference (section label): [temp.res.general]
Issue Description
In [temp.res.general] p6, it is stated that the program is ill-formed, no diagnostic required as the result of invalid constructs in templates, and:
The latter sentence serves no apparent purpose because the reader would not expect a diagnostic to be required if the program does not violate any of the listed conditions. Furthermore, it could be misinterpreted to mean that diagnostic messages such as optional warnings are required to be suppressed:
Issuing a
-Wconversion
warning in this example could be seen as not conforming. Of course, an implementation could simply not treat-Wconversion
as a diagnostic as per [defns.diagnostic]. However, this interpretation means that some warnings are diagnostics and some aren't, which is contrived, and complicated for the reader.Suggested resolution
Update [temp.res.general] p6 as follows: