public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Dewar <dewar@adacore.com>
To: Michael Matz <matz@suse.de>
Cc: "Nadezhda Ivanоvna Vyukova" <niva@niisi.msk.ru>,
	gcc@gnu.org, gcc-help@gnu.org
Subject: Re: Gcc silently transforms a finite loop to an infinite one
Date: Tue, 29 Nov 2011 16:15:00 -0000	[thread overview]
Message-ID: <4ED4E62D.3020102@adacore.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1111291426550.26507@wotan.suse.de>

On 11/29/2011 8:29 AM, Michael Matz wrote:

>> IMHO it would be better to issue a warning when a finite loop is
>> transformed to an infinite one (as a result of -ftree-vrp).
>
> -Wstrict-overflow gives a warning in this program.  This warning isn't
> active by default.  4.1 didn't yet have this warning IIRC.

I would tend to agree that when this transformation is applied, an
unconditional warning is appropriate. It's almost certainly indicative
of a bug, and indeed the character case of this report is such a common
case that I would look for it specifically and diagnose it (and
preferably make it "work").
>
>
> Ciao,
> Michael.

  reply	other threads:[~2011-11-29 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1322566691.2994.43.camel@ab02>
2011-11-29 14:55 ` Michael Matz
2011-11-29 16:15   ` Robert Dewar [this message]
2011-11-29 19:20     ` Michael Matz

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=4ED4E62D.3020102@adacore.com \
    --to=dewar@adacore.com \
    --cc=gcc-help@gnu.org \
    --cc=gcc@gnu.org \
    --cc=matz@suse.de \
    --cc=niva@niisi.msk.ru \
    /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).