public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Geoff Keating <geoffk@cygnus.com>
To: dewar@gnat.com
Cc: kenner@vlsi1.ultra.nyu.edu, gcc@gcc.gnu.org
Subject: Re: Pathalogical divides
Date: Sun, 24 Sep 2000 23:29:00 -0000	[thread overview]
Message-ID: <200009250627.XAA20873@geoffk.org> (raw)
In-Reply-To: <20000925060704.18ACD34DB0@nile.gnat.com>

> Cc: gcc@gcc.gnu.org
> Date: Mon, 25 Sep 2000 02:07:04 -0400 (EDT)
> From: dewar@gnat.com (Robert Dewar)
> 
> <<Yes.  C interpreters are permitted to do anything they like when
> signed integer arithmetic overflows, including producing a signal.
> >>
> 
> Actually while I think that is a valid interpretation of K&R rules,
> it is VERY difficult to read the ANSI standard this way, check out
> the exact wording, which seems to imply that the result is implementation
> defined within certain limits, but I cannot read it to allow a signal.

???

It says, in s. 6.5 paragraph 5 of ISO/IEC 9899:1999:

 If an _exceptional condition_ occurs during the evaluation of an
 expression (that is, if the result is not mathematically defined or
 not in the range of representable values for its type), the behaviour
 is undefined.

'undefined behaviour' can always include a signal, or anything else
that a mad compiler designer could dream up.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

  reply	other threads:[~2000-09-24 23:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-25  2:35 Robert Dewar
2000-09-24 23:29 ` Geoff Keating [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-09-25  6:57 Robert Dewar
2000-09-25  5:19 Robert Dewar
2000-09-25  2:43 Richard Kenner
2000-09-25 14:27 ` Geoff Keating
2000-09-26  4:37   ` Jamie Lokier
2000-09-21 12:12 Richard Kenner
2000-09-22  1:45 ` Andreas Schwab
2000-09-23 13:38 ` Jeffrey A Law
2000-09-25  6:53   ` Alexandre Oliva
2000-09-24 22:53 ` Geoff Keating

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=200009250627.XAA20873@geoffk.org \
    --to=geoffk@cygnus.com \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).