public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55559] [4.6/4.7/4.8 Regression] Marshalling double through union with inlines, incorrect behavior with -O2 Date: Tue, 04 Dec 2012 09:03:00 -0000 [thread overview] Message-ID: <bug-55559-4-7y3WXUj4Td@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55559-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55559 --- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> 2012-12-04 09:02:00 UTC --- On Mon, 3 Dec 2012, mpreda at gmail dot com wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55559 > > --- Comment #7 from Mihai Preda <mpreda at gmail dot com> 2012-12-03 22:13:03 UTC --- > Thanks, I didn't realize that (unsigned)-1.0 is undefined. > > For the behavior I was expecting it's enough to use an intermediary cast > through int, e.g. (unsigned)(int)-1.0. Yes, that makes it implementation-defined (and all implementations I know of do what you expect, modulo-two reduction). > It may be nice to generate a consistent (-O0/-O1) result for (unsigned)-1.0 > though, even if not required by the standard. That's unfortunately generally impossible.
prev parent reply other threads:[~2012-12-04 9:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-01 22:56 [Bug c++/55559] New: " mpreda at gmail dot com 2012-12-02 0:10 ` [Bug tree-optimization/55559] " pinskia at gcc dot gnu.org 2012-12-02 11:16 ` mikpe at it dot uu.se 2012-12-02 16:05 ` mikpe at it dot uu.se 2012-12-03 11:44 ` [Bug tree-optimization/55559] [4.6/4.7/4.8 Regression] " rguenth at gcc dot gnu.org 2012-12-03 12:30 ` rguenth at gcc dot gnu.org 2012-12-03 12:52 ` paolo.carlini at oracle dot com 2012-12-03 22:13 ` mpreda at gmail dot com 2012-12-04 9:03 ` rguenther at suse dot de [this message]
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-55559-4-7y3WXUj4Td@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: linkBe 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).