9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <charles.forsyth@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Conversion of constants in C compiler
Date: Wed, 20 Apr 2022 12:38:15 +0100	[thread overview]
Message-ID: <CAOw7k5iOdaz2tDo3+1T-GQg_FOBdC_-TPWiUrffwBw=B4zRRiw@mail.gmail.com> (raw)
In-Reply-To: <16a447c9-e11-c379-598-7430d2ed39d4@SDF.ORG>

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

The short answer is whatever the historical reasons for the current
interpretation(s), it should follow C99 rules to avoid confusion.
One potential catch is that the compilers don't implement C99 rules when
signed and unsigned values meet, but something closer to the original
convention
(which frankly was simpler) that the result (or comparison) is unsigned,
portably, regardless of word size. I suspect things will break if that is
changed,
although again using the C99 rule is probably less confusing in the end,
because both people and new incoming programs will expect the C99
interpretation.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T22754f10b241991c-M9c8aea84ddf712920e17bc0e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1320 bytes --]

  reply	other threads:[~2022-04-20 11:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 10:19 adr
2022-04-20 11:38 ` Charles Forsyth [this message]
2022-04-20 14:37   ` adr
2022-04-20 14:37 ` ori
2022-04-21  7:54   ` adr
2022-04-21 15:29     ` ori
2022-04-28  1:10     ` ori
2022-05-01 12:03       ` adr
2022-04-28  2:43     ` ori
2022-04-28  3:12       ` ori
2022-05-01 12:35       ` adr
2022-05-09 19:31         ` adr
2022-05-10 13:06           ` adr
2022-05-10 14:48             ` adr
2022-06-06  0:35 adr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOw7k5iOdaz2tDo3+1T-GQg_FOBdC_-TPWiUrffwBw=B4zRRiw@mail.gmail.com' \
    --to=charles.forsyth@gmail.com \
    --cc=9fans@9fans.net \
    --subject='Re: [9fans] Conversion of constants in C compiler' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).