public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@hurl.cygnus.com>
To: Chip Salzenberg <chip@perlsupport.com>
Cc: Joe Buck <jbuck@Synopsys.COM>,
	moshier@mediaone.net, tim@wagner.Princeton.EDU,
	tprince@cat.e-mail.com, bosch@gnat.com, burley@gnu.org,
	egcs@cygnus.com, hjstein@bfr.co.il
Subject: Re: /internet
Date: Wed, 16 Dec 1998 16:20:00 -0000	[thread overview]
Message-ID: <28338.913853871@hurl.cygnus.com> (raw)
In-Reply-To: <19981216162248.Z22090@perlsupport.com>

  In message < 19981216162248.Z22090@perlsupport.com >you write:
  > According to Joe Buck:
  > > NCEG:
  > > >        Thus,  the result of the sum (a + 32760) is next added to b,
  > > >        and that result is then added to  5  which  results  in  the
  > > >        value  assigned  to  a.   On  a  machine  in which overflows
  > > >        produce an explicit trap and in which the  range  of  values
  > > >        representable   by   an   int   is   [-32768,  +32767],  the
  > > >        implementation cannot rewrite this expression as
  > > > 
  > > >                a = ((a + b) + 32765);
  > > 
  > > Amazing.  These guys are trying to turn C into Ada.
  > 
  > Hey, it only applies to machines where integer overflows trap.  Would
  > it be a problem to say that EGCS targets should never include such
  > environments?  Integer overflow traps are almost unheard of in C.
We'd have to introduce some new code to handle such an architecture if
one was to ever come along.

Right now GCC assumes integer instructions do not trap on overflow and wrap
in the expected manner.  As long as gcc is presented with that kind of
architecture it can reassociate integer operations in useful ways.

Some of gcc's existing targets have instructions which trap on overflow, but
they also include corresponding instructions which do not trap.  GCC uses
the non trapping variants.



jeff

  reply	other threads:[~1998-12-16 16:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-15 15:06 /internet tprince
1998-12-15 19:12 ` /internet Stephen L Moshier
1998-12-15 19:21   ` /internet Joe Buck
1998-12-15 19:37     ` /internet Jeffrey A Law
1998-12-16  7:58       ` /internet Tim Hollebeek
1998-12-16  8:41         ` /internet Joe Buck
1998-12-16 11:45           ` /internet Stephen L Moshier
1998-12-16 11:59             ` /internet Joe Buck
1998-12-16 13:19               ` /internet Chip Salzenberg
1998-12-16 16:20                 ` Jeffrey A Law [this message]
1998-12-16 17:42                   ` /internet Joern Rennecke
1998-12-17  9:46                     ` /internet Horst von Brand
1998-12-16 16:37               ` /internet Jeffrey A Law
1998-12-16 16:56                 ` /internet Per Bothner
1998-12-17 20:20                   ` /internet Jeffrey A Law
1998-12-16 17:52                 ` /internet Joern Rennecke
1998-12-17  4:43                 ` /internet Sylvain Pion
1998-12-17 10:26               ` /internet Craig Burley
1998-12-15 23:08     ` /internet Matthias Urlichs
1998-12-16  9:33       ` /internet Craig Burley
1998-12-16  5:44     ` /internet Stephen L Moshier
1998-12-16  9:37   ` /internet Craig Burley
  -- strict thread matches above, loose matches on Subject: below --
1998-12-16 12:34 /internet Geert Bosch
1998-12-16 13:02 ` /internet Harvey J. Stein
1998-12-16 16:25 ` /internet Jeffrey A Law
1998-12-04 17:41 /internet tprince

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=28338.913853871@hurl.cygnus.com \
    --to=law@hurl.cygnus.com \
    --cc=bosch@gnat.com \
    --cc=burley@gnu.org \
    --cc=chip@perlsupport.com \
    --cc=egcs@cygnus.com \
    --cc=hjstein@bfr.co.il \
    --cc=jbuck@Synopsys.COM \
    --cc=moshier@mediaone.net \
    --cc=tim@wagner.Princeton.EDU \
    --cc=tprince@cat.e-mail.com \
    /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).