Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: this girl calls c ugly
Date: Sat, 15 Aug 2026 09:37:48 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <86tsov49wj.fsf@linuxsc.com>
References: <10v7b32$2u85v$1@dont-email.me> <86ecipcbqa.fsf@linuxsc.com> <10vnlgu$382un$2@kst.eternal-september.org> <86bjdpayv0.fsf@linuxsc.com> <11003or$t9b$1@reader1.panix.com> <1100gbk$1lt8i$2@kst.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sat, 15 Aug 2026 16:37:51 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="3722133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ClEuVm0WefVyxnIREKhj46mL2jds6nSI="; posting-host="f88cfb7384c39afe54609bf3101f3803"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:G6pyyt0gTP1kLphNX5MOBMMGoNE= sha1:KyJiZDOBlrcBs4x62mVqNp4zlqM= sha256:rwJ5SBaWeCbbYzOLCaMzdhI0BQ0WcHqJ/MMEBEEYHKE= sha1:GFecl9PG1iJrwRcIPAKkw7bwYBo= sha256:y5qj+srPbM7vgSCAxN4C1lOv+qEJo6/FRFkl9AIGK6c=
Xref: csiph.com comp.lang.c:401213
Keith Thompson writes:
> cross@spitfire.i.gajendra.net (Dan Cross) writes:
> [...]
>
>> The text of the standard explicitly carves this out; or, rather,
>> it attempts to. If the result of an expression is not
>> representable in the target type, _regardless of whether that's
>> due to UB or not_, a diagnostic is required.
>
> [...]
>
> How would an expression (appearing in a context that requires an
> integer constant expression) not "evaluate to a constant that is in
> the range of representable values for its type" other than by UB?
I can think of one.