From: Paul Brook <paul@codesourcery.com>
To: gcc@gcc.gnu.org
Cc: Nicholas Nethercote <njn@cs.utexas.edu>
Subject: Re: Overflow in Fortran (was: Where does the C standard describe overflow of signed integers?)
Date: Mon, 11 Jul 2005 15:18:00 -0000 [thread overview]
Message-ID: <200507111618.18768.paul@codesourcery.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0507110948081.20206@charco.cs.utexas.edu>
On Monday 11 July 2005 15:58, Nicholas Nethercote wrote:
> Also, does anyone know what the required behaviour for Fortran integers is
> on overflow?
Section 7.1.7 "Evaluation of operation"
"The evaluation of any numeric operation whose result is not defined by the
arithmetic used by the processor[1] is prohibited"
Section 13.7.1 "Models for integer and real data"
The model set for integer i is defined by:
[sign + magnitude]
ie. overflow is not defined, and we can do whatever the hell we want.
Paul
[1] In this context "processor" means language processor, ie. a combination
the compiler, OS and target hardware.
next prev parent reply other threads:[~2005-07-11 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 14:58 Where does the C standard describe overflow of signed integers? Nicholas Nethercote
2005-07-11 15:07 ` Dave Korn
2005-07-11 16:07 ` Nicholas Nethercote
2005-07-11 17:04 ` Dave Korn
2005-07-11 15:15 ` Nathan Sidwell
2005-07-11 15:23 ` Dave Korn
2005-07-11 15:18 ` Paul Brook [this message]
2005-07-12 23:13 ` Michael Meissner
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=200507111618.18768.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=gcc@gcc.gnu.org \
--cc=njn@cs.utexas.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).