public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59933] for loop goes wild with assert() enabled
Date: Wed, 19 Feb 2014 16:41:00 -0000	[thread overview]
Message-ID: <bug-59933-4-YI3twWFxGG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59933-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We have -fsanitize=undefined which can catch some issues, though the array
bounds instrumentation (nor __builtin_object_size based instrumentation) has
not been added yet for GCC 4.9, will be hopefully there in the next release.
As for warnings, even the current -Waggressive-loop-optimizationsh warning (for
the const number of iterations, single loop exit easy case where you know that
if the loop is reachable, if there is undefined behavior in some loop
iteration, you will trigger it) still has occassional false positives (various
PRs about that, usually the issue is that while it is true there is such a
loop, the loop is actually dead), further warnings would have huge false
positive rate, to the extent that it would be rarely useful.


  parent reply	other threads:[~2014-02-19 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 12:56 [Bug c/59933] New: " warnerme at ptd dot net
2014-01-24 13:00 ` [Bug c/59933] " warnerme at ptd dot net
2014-01-29 12:25 ` ian at g0tcd dot com
2014-01-29 13:14 ` ian at g0tcd dot com
2014-02-19  8:36 ` mpolacek at gcc dot gnu.org
2014-02-19 12:27 ` warnerme at ptd dot net
2014-02-19 14:08 ` warnerme at ptd dot net
2014-02-19 14:54 ` mpolacek at gcc dot gnu.org
2014-02-19 15:49 ` jakub at gcc dot gnu.org
2014-02-19 16:12 ` ian at g0tcd dot com
2014-02-19 16:41 ` jakub at gcc dot gnu.org [this message]
2014-02-19 20:57 ` jakub at gcc dot gnu.org
2014-02-20  1:00 ` ian at g0tcd dot com

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=bug-59933-4-YI3twWFxGG@http.gcc.gnu.org/bugzilla/ \
    --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).