3 ms·
If the C++ standard imposes no requirements on such a program, then that means that the program is not C++. It's quite reasonable to describe such a program as
by wat10000 3mo ago
If the C++ standard imposes no requirements on such a program, then that means that the program is not C++. It's quite reasonable to describe such a program as an "incorrect [C++] program."
- JdeBP 3mo agoThis is a semantic quagmire, and the threads on what undefined behaviour is are interminable. But just note this time around that correctness is not the same as conformity.
- pjmlp 3mo agoSemantics matter to compiler vendors though, which is why C++ 26 now introduced erroneous behaviour as an attempt to fix UB.
- wat10000 3mo agoWhat's the difference? There's no such thing as "incorrect C++, but still C++." A program is either correct/valid/conforming C++, or it's not. We can reasonably describe "not" as "incorrect," or "invalid," "nonconforming," or just "not C++."