public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: gcc-patches@gcc.gnu.org
Cc: gcc@gcc.gnu.org
Subject: Re: [PATCH][4.3] Deprecate -ftrapv
Date: Sat, 01 Mar 2008 14:15:00 -0000	[thread overview]
Message-ID: <fqbo2o$g7j$1@ger.gmane.org> (raw)
In-Reply-To: <10803011408.AA02772@vlsi1.ultra.nyu.edu>

Richard Kenner wrote:
>> int f(int a, int b) { return 0 * (a + b); }
>>
>> get the potentially trapping arithmetic folded away.  If -ftrapv is to 
>> have properly defined semantics, those must include trapping if (a + b) 
>> overflows in the above code.
> 
> Why?  Is there any language that requires such semantics?

Not C, since trapping overflow is just one facet of "undefined behavior" 
and we can define that facet as we wish! :-)

Paolo

  parent reply	other threads:[~2008-03-01 14:15 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0803010041110.4133@zhemvz.fhfr.qr>
2008-03-01  0:04 ` Richard Guenther
2008-03-01  0:05 ` Mark Mitchell
2008-03-01  0:11   ` Richard Kenner
2008-03-01  2:05     ` Robert Dewar
2008-03-01  2:17       ` Joseph S. Myers
2008-03-01  2:33         ` Robert Dewar
2008-03-01 13:19           ` Joseph S. Myers
2008-03-01 14:05             ` Paolo Bonzini
2008-03-01 11:24       ` Richard Kenner
2008-03-01 13:55         ` Robert Dewar
2008-03-01 14:12           ` Richard Kenner
2008-03-01 14:18             ` Robert Dewar
2008-03-01  0:14   ` Richard Guenther
2008-03-01  1:04     ` Mark Mitchell
2008-03-01  1:49       ` Joseph S. Myers
2008-03-01  1:54         ` Mark Mitchell
2008-03-01 12:32         ` Richard Guenther
2008-03-01 13:10           ` Joseph S. Myers
2008-03-01 13:38             ` Robert Dewar
2008-03-01 13:57               ` Richard Guenther
2008-03-01 14:05                 ` Robert Dewar
2008-03-01 19:53                   ` Florian Weimer
2008-03-01 20:11                     ` Robert Dewar
2008-03-01 21:19                       ` Florian Weimer
2008-03-01 21:43                         ` Robert Dewar
2008-03-01 21:48                           ` Robert Dewar
2008-03-01 14:14                 ` Richard Kenner
2008-03-01 13:50             ` Richard Guenther
2008-03-01 18:27               ` Joseph S. Myers
2008-03-01 14:06             ` Richard Kenner
2008-03-01 14:10               ` Richard Guenther
2008-03-01 14:15                 ` Robert Dewar
2008-03-01 14:13               ` Robert Dewar
2008-03-01 14:15               ` Paolo Bonzini [this message]
2008-03-01 18:32               ` Joseph S. Myers
2008-03-02 10:47                 ` Mark Mitchell
2008-03-02 11:08                   ` Richard Guenther
2008-03-02 11:52                     ` Robert Dewar
2008-03-03 22:45                       ` Eric Botcazou
2008-03-04  2:38                         ` Robert Dewar
2008-03-03 18:36                     ` Ian Lance Taylor
2008-03-02 11:29                   ` Robert Dewar
2008-03-02 11:36                   ` Richard Kenner
2008-03-02 14:24                   ` Frank Ch. Eigler
2008-03-02 14:31                     ` Robert Dewar
2008-03-02 15:14                       ` Frank Ch. Eigler
2008-03-02 15:21                         ` Robert Dewar
2008-03-02 15:48                           ` Frank Ch. Eigler
2008-03-02 16:08                             ` Robert Dewar
2008-03-02 15:22                         ` Robert Dewar
2008-03-01 19:58               ` Florian Weimer
2008-03-01 20:04                 ` Florian Weimer
2008-03-01 20:12                 ` Robert Dewar
2008-03-01 21:25                   ` Florian Weimer
2008-03-01 21:45                     ` Robert Dewar
2008-03-01 12:31       ` Richard Guenther
2008-03-01 14:00         ` Paolo Bonzini
2008-03-02 13:00         ` Joseph S. Myers
2008-03-02 13:03           ` Richard Guenther
2008-03-05 22:46     ` Ken Raeburn
2008-03-01  0:16   ` David Daney
2008-03-01  2:08     ` Robert Dewar
2008-03-01  6:54   ` Tom Tromey
2008-03-01  0:12 ` Joseph S. Myers
2008-03-01  0:23   ` Richard Guenther
2008-03-01  0:49     ` Joseph S. Myers
2008-03-01  1:57 ` Robert Dewar
2008-03-01 12:33   ` Richard Guenther
2008-03-01 13:08     ` Robert Dewar
     [not found]   ` <fqbn6k$d5j$1@ger.gmane.org>
2008-03-01 13:58     ` Robert Dewar
2008-03-01 14:00       ` Richard Guenther
2008-03-03 22:53       ` Eric Botcazou
2008-03-04  2:39         ` Robert Dewar
2008-03-01 22:16 FX Coudert
2008-03-01 22:31 ` Robert Dewar

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='fqbo2o$g7j$1@ger.gmane.org' \
    --to=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    /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).