9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <charles.forsyth@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Undefined Behaviour in C
Date: Mon, 23 Nov 2015 12:40:46 +0000	[thread overview]
Message-ID: <CAOw7k5iwgrok9w8QdTEHFAD=N-jO4-bskiqNcQsdxWt=Dq-Jdg@mail.gmail.com> (raw)
In-Reply-To: <DB091878-EBD4-41A4-B1A5-5B02CBF84B9F@me.com>

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

On 23 November 2015 at 12:17, Brantley Coile <brantleycoile@me.com> wrote:

> I've lived with the old definition so long that I didn't notice Plan 9's
> definition, which is not a problem on today's architectures because there
> are two equally efficient instructions to choose from.


There are a few things in C's definition where things aren't specified as
portably as they might now be,
because they just turned out to be different on different platforms,
especially once there were several compiler implementations.
An early example of the former is "bit fields", which are such a mess that
Plan 9 code never uses them. An example of the latter was the
long argument between "value preserving" and "unsigned preserving" for
choosing the type when unsigned values met signed ones.
"Unsigned preserving" is trivial, and at least easy to understand. ANSI
went for "value preserving" (even though it doesn't really
preserve values, except in the sense of formaldehyde) and the rules are
surprisingly elaborate.

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

  reply	other threads:[~2015-11-23 12:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 10:20 Ramakrishnan Muthukrishnan
2015-11-23 11:20 ` Vasudev Kamath
2015-11-25 10:27   ` Alexandru Gheorghe
2015-11-25 10:43     ` Brantley Coile
2015-11-25 10:53       ` Brantley Coile
2015-11-25 12:59       ` Charles Forsyth
2015-11-25 13:48         ` erik quanstrom
2015-11-25 14:25           ` Brantley Coile
2015-11-25 14:31             ` Brantley Coile
2015-11-25 16:03             ` plannine
2015-11-25 17:13               ` Ryan Gonzalez
2015-11-25 18:41                 ` Brantley Coile
2015-11-26  2:04                   ` Prof Brucee
2015-11-26  2:43                     ` Brantley Coile
2015-11-26  2:57                       ` Prof Brucee
2015-11-26  3:48                         ` Ryan Gonzalez
2015-11-26  7:27                     ` Bakul Shah
2015-11-26 11:22                       ` Brantley Coile
2015-11-26 11:37                         ` tlaronde
2015-11-26 11:55                           ` Charles Forsyth
2015-11-26 11:38                         ` Bruce Ellis
2015-11-26 16:31                         ` erik quanstrom
2015-11-26 16:42                           ` Brantley Coile
2015-11-26 16:50                             ` Charles Forsyth
2015-11-26 17:12                               ` erik quanstrom
2015-11-26 16:46                           ` Alexandru Gheorghe
2015-11-26 17:48                         ` Bakul Shah
2015-11-26 18:04                           ` Brantley Coile
2015-11-26 23:14                           ` Steve Simon
2015-11-26 23:24                             ` Charles Forsyth
2015-11-26 23:55                             ` Brantley Coile
2015-11-25 19:19               ` Steffen Nurpmeso
2015-11-23 11:32 ` Charles Forsyth
2015-11-23 11:37   ` Charles Forsyth
2015-11-23 11:50 ` Brantley Coile
2015-11-23 12:05   ` Charles Forsyth
2015-11-23 12:17     ` Brantley Coile
2015-11-23 12:40       ` Charles Forsyth [this message]
2015-11-23 12:09   ` Charles Forsyth
2015-11-23 14:30 ` Charles Forsyth

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='CAOw7k5iwgrok9w8QdTEHFAD=N-jO4-bskiqNcQsdxWt=Dq-Jdg@mail.gmail.com' \
    --to=charles.forsyth@gmail.com \
    --cc=9fans@9fans.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).