C++ Logo

std-proposals

Advanced search

Re: Remove infinite loop UB

From: FrankHB <frankhb1989_at_[hidden]>
Date: Thu, 28 May 2020 18:31:51 +0800
This is technically not a case of UB. The definition in [defns.undefined]
have no normative wording indicating that missing explicit definitions of
specific behavior necessarily leads to UB, as ISO C does for "undefined
behavior" in the normative text in Clause 4. Moreover, the "may assume"
wording of [intro.progress] does make some guarantees of the required
behavior of conforming implementations upon the meaning of the word "may"
defined in ISO/IEC directive, part 2. That is, it is essentially
unspecified, rather than undefined. Conforming programs still can not rely
on the assumptions about the infinite loop implemented in the object code
in this sense, though; but that does not make all other part of the program
unpredictable or unportable as in the case of UB.

Received on 2020-05-28 05:35:12