Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.std.c Subject: Re: contradiction about the INFINITY macro Date: Mon, 03 Jan 2022 12:03:53 -0800 Organization: A noiseless patient Spider Lines: 25 Message-ID: <86o84sy4ba.fsf@linuxsc.com> References: <20210930012112$48d9@zira.vinc17.org> <87pmsqizrh.fsf@nosuchdomain.example.com> <20210930105413$d6e8@zira.vinc17.org> <86wnmoov7c.fsf@linuxsc.com> <20211009201151$a68b@zira.vinc17.org> <87fst75p15.fsf@nosuchdomain.example.com> <87bl3v58nv.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="b777881512c6754df6234a0926bb3175"; logging-data="24968"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UgkoPYZYPa/ANt/3kAL9MoxGrDNDhIQU=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:k4An+7FulkkjoZGG9QRBAcGqeFo= sha1:RYmmjs/xXsg1DjMCddsJyyoj5ug= Xref: csiph.com comp.std.c:6407 Keith Thompson writes: [ is a constraint violation always undefined behavior? ] > [...] one possible interpretation of the phrase "a restriction > ... by which the exposition of language elements is to be > interpreted" could be that if the constraint is violated, there > is no meaningful interpretation. Or to put it another way, > that the semantic description applies only if all constraints > are satisfied. > > I've searched for the word "constraint" in the C89 and C99 > Rationale documents. They were not helpful. > > I am admittedly trying to read into the standard what I think > it *should* say. A rule that constraint violations cause > undefined behavior would, if nothing else, make the standard a > bit simpler. Note that constraint violations are not undefined behavior in a strict literal reading of the definition. Undefined behavior means there are no restrictions as to what an implemenation may do, but constraint violations require the implementation to issue at least one diagnostic, which is not the same as "no restrictions".