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: Safety of casting from 'long' to 'int'
Date: Fri, 08 May 2026 07:40:43 -0700
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <86pl36t15g.fsf@linuxsc.com>
References: <10su8cn$am9i$1@dont-email.me> <10t4hse$22u36$1@dont-email.me> <97a1c40bf71cfe8edab25d5ac8a1ad435c3995e5.camel@gmail.com> <10t4tjd$25vb5$1@dont-email.me> <10t4viv$25van$2@dont-email.me> <10t5dn8$2aje4$1@dont-email.me> <10t64u6$36agp$2@paganini.bofh.team> <10t66eg$2houe$2@dont-email.me> <10t6bf2$36qnd$1@paganini.bofh.team> <10t79qb$2rcc9$1@dont-email.me> <10t8gdh$36t8v$2@kst.eternal-september.org> <10t8m1v$3989q$1@dont-email.me> <10t8sev$3h2jc$1@paganini.bofh.team> <10ta7fn$3mqnh$1@dont-email.me> <10taenk$3ou8g$1@dont-email.me> <10tbfd2$1gsnu$12@dont-email.me> <10tbl1g$40l5$1@kst.eternal-september.org> <10tcp9h$1gsnu$15@dont-email.me> <86ik91x0f2.fsf@linuxsc.com> <10tec6a$1gsnu$17@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 08 May 2026 14:40:44 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="3100621"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19p+r86jkClEfLtZKRoqswyD5CwtwCyIrg="; posting-host="12a84863e630bdf33525bc8ffa10a418"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:UtAObLoJ2g4iz5f2MgqziWjNQXU= sha1:v5D4MRrvGMmzOr3BTLL8nKkunHU= sha256:vvz3LMnNds5OOyDcyPPz7KvavHwIeKTpXE7fYi2YY1c= sha1:k7SvDlQd4PeLScxbce5glKNd+jA=
Xref: csiph.com comp.lang.c:398492
Janis Papanagnou writes:
> On 2026-05-05 18:53, Tim Rentsch wrote:
>
>> Janis Papanagnou writes:
>>
>>> [*] One source is:
>>> https://people.csail.mit.edu/nickolai/papers/wang-undef-2012-07-12.pdf
>>
>> [...]
>>
>>> For folks who haven't yet read it I'd suggest to read it; it's very
>>> enlightening. (But also sort of a horror story.)
>>
>> I don't see it as a horror story. Maybe a cautionary tale. [...]
>
> I could agree that folks, depending on their character, can react
> differently on that paper. Unless paralyzed, threatened, or fleeing,
> keeping a cool head and being cautionary is certainly advisable in
> that territory.
Yes. Also, in my case at least part of my calmness came from having
seen cases with surprising consequences before.