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
"ill-formed with no diagnostic required" is odd #3673
Comments
It seems to me that all such occurrences in the ranges-related wording are actually misuses of "ill-formed, no diagnostic required". |
We chose IFNDR in these cases over UB to allow a sufficiently smart compiler to reject the program if it can prove that a selected operation does not have the required semantics whether or not it can prove that the operation is necessarily executed at runtime. |
@CaseyCarter , thanks for the explanation. So, this was intentional and needs an LWG issue to change. (I disagree with your reasoning, btw; the resulting outcome is much worse than "undefined behavior" and a compiler is free to give warnings or similar even when otherwise successfully compiling the program. Also, the use of IF-NDR for this purpose seems to be rather unique, also among the core language clauses.) |
Clarifying: the problem in this issue isn't that IFNDR should be some other behavior, it's that LWG noticed my particular phrasing "ill formed with no diagnostic required" is novel and wanted to harmonize it with other phrasings. |
I understand that, but it's still morally the wrong thing to say here. |
There are several occurrences of the novel phrase ""ill-formed with no diagnostic required" in the [ranges] wording; P2091R0 will add more. These should all be changed to a more common form such as "ill-formed, no diagnostic is required."
(Feel free to assign this issue to me.)
The text was updated successfully, but these errors were encountered: