public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anders_jagd at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/45884] Incorrect removal of check for "less than zero" after adding value to (signed) long
Date: Mon, 04 Oct 2010 18:12:00 -0000	[thread overview]
Message-ID: <20101004181200.lzRk0hvvbqBElIgN1-4Pzn4V76MOEdyHjNErAk2L98c@z> (raw)
In-Reply-To: <bug-45884-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45884

--- Comment #2 from Anders Jagd <anders_jagd at yahoo dot com> 2010-10-04 18:12:16 UTC ---
(In reply to comment #1)
> Signed integer overflow is undefined so what GCC is doing is correct.  Use
> -fwarpv if you want it to be defined to wrapping.

I acknowledge that ISO/IEC 9899 defines integer overflow to be undefined. What
GCC doing is thus "not incorrect". However, would this maybe be a bit too
aggressive optimization at -O2 ?


  parent reply	other threads:[~2010-10-04 18:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 17:58 [Bug c/45884] New: " anders_jagd at yahoo dot com
2010-10-04 18:01 ` [Bug c/45884] " pinskia at gcc dot gnu.org
2010-10-04 18:12 ` anders_jagd at yahoo dot com [this message]
2010-10-04 18:13 ` pinskia at gcc dot gnu.org

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=20101004181200.lzRk0hvvbqBElIgN1-4Pzn4V76MOEdyHjNErAk2L98c@z \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).