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: Thu, 14 May 2026 06:07:39 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <86tssai1gk.fsf@linuxsc.com>
References: <10su8cn$am9i$1@dont-email.me> <10tls2u$39j7a$1@dont-email.me> <10tm49i$9d$1@reader1.panix.com> <10tn3so$3j8hc$1@dont-email.me> <10tnj8s$pnq$1@reader1.panix.com> <10tnmk6$3os5b$1@dont-email.me> <10tnnv1$3o0n8$2@dont-email.me> <10tntu0$3r6q3$1@dont-email.me> <865x4vrqgu.fsf@linuxsc.com> <10tqp0l$ktbv$1@dont-email.me> <861pfiq8xc.fsf@linuxsc.com> <10tt6u4$1adha$6@kst.eternal-september.org> <86h5oblg91.fsf@linuxsc.com> <10u1nlo$1l93k$16@dont-email.me> <86v7crjijp.fsf@linuxsc.com> <10u2gg7$2t96p$1@kst.eternal-september.org> <86a4u3j5i6.fsf@linuxsc.com> <10u39hh$34b89$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 14 May 2026 13:07:42 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="422293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+i+113Hm17cL3kgXJH5q8K04OnuS5esRk="; posting-host="d527bc7f7e7e084b0e2324cbe71ceb59"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:2GfHtsKdIcOtHlhvz1ffC1wPc20= sha1:YsROoVsu8n+Q3Go4XUKAZVFbaY0= sha256:zyd+1GFekqkwq5DSg2swltudoekzgUzJmi5F2E6uYnM= sha1:1dgGaS35AnU8WxwTtwnm59rCN7M=
Xref: csiph.com comp.lang.c:398945
Janis Papanagnou writes:
> On 2026-05-14 00:42, Tim Rentsch wrote:
>
>> I must remember to start using "char unsigned" in preference to
>> "unsigned char". ;)
>
> Despite the smiley I can't really interpret that. So a honest
> question; is there a difference in those two, or what do you
> want to express by that?
The emoticon was meant to be a wink; in other words I was joking.
Both "unsigned char" and "char unsigned" are legal, and mean the
same thing as far as the language rules go, but the first one
sounds normal and the second one sounds like Yoda. My only
intention was to make people laugh.