public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu dot se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code
Date: Sun, 12 Apr 2009 09:11:00 -0000 [thread overview]
Message-ID: <20090412091114.7443.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39736-15165@http.gcc.gnu.org/bugzilla/>
------- Comment #2 from mikpe at it dot uu dot se 2009-04-12 09:11 -------
(In reply to comment #1)
> There is no undefined behavior here (increment of a short value converts
> to int, increments then converts back to short, none of which are
> undefined), so at least the wrong code issue would be the same as bug
> 35634.
It's not undefined, but the conversion from int back to short provokes
implementation-defined behaviour when the int value doesn't fit in a short.
That makes this test program not strictly conforming.
The lack of a compile-time warning is unfortunate, but I don't think this is a
case of wrong-code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39736
next prev parent reply other threads:[~2009-04-12 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 12:30 [Bug tree-optimization/39736] New: " edwintorok at gmail dot com
2009-04-11 12:52 ` [Bug tree-optimization/39736] " joseph at codesourcery dot com
2009-04-12 9:11 ` mikpe at it dot uu dot se [this message]
2009-04-12 9:32 ` edwintorok at gmail dot com
2009-04-12 21:34 ` mikpe at it dot uu dot se
2009-04-13 6:56 ` edwintorok at gmail dot com
2009-04-13 7:53 ` schwab at linux-m68k dot org
2009-04-13 8:20 ` rguenth at gcc dot gnu dot 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=20090412091114.7443.qmail@sourceware.org \
--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).