public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sebastian.huber@embedded-brains.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55137] [4.8 Regression] Unexpected static structure initialization
Date: Tue, 06 Nov 2012 15:35:00 -0000 [thread overview]
Message-ID: <bug-55137-4-4pWzakdUxK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55137-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55137
--- Comment #5 from Sebastian Huber <sebastian.huber@embedded-brains.de> 2012-11-06 15:34:57 UTC ---
(In reply to comment #3)
> enum E { E1 = -1 + (int) (sizeof (int) - 1) };
> errors while it used to be accepted before.
> Dunno if that is valid or not.
> If it is valid, the series of foldings that result into the overflow are first
> folding sizeof (int) - 1UL into sizeof (int) + 18446744073709551615UL and later
> on conversion of -1 + (int) (sizeof (int) + 18446744073709551615UL) to
> -1 + (int) sizeof (int) + (int) 18446744073709551615UL.
Why is the ( ) ignored? The sizeof (int) - 1 is clearly an unsigned integer
which can be converted to a signed integer.
next prev parent reply other threads:[~2012-11-06 15:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 12:17 [Bug c++/55137] New: " sebastian.huber@embedded-brains.de
2012-10-30 12:56 ` [Bug c++/55137] " paolo.carlini at oracle dot com
2012-10-30 12:57 ` paolo.carlini at oracle dot com
2012-11-06 15:04 ` jakub at gcc dot gnu.org
2012-11-06 15:21 ` jakub at gcc dot gnu.org
2012-11-06 15:32 ` sebastian.huber@embedded-brains.de
2012-11-06 15:35 ` sebastian.huber@embedded-brains.de [this message]
2012-11-06 15:37 ` jakub at gcc dot gnu.org
2012-11-06 15:51 ` sebastian.huber@embedded-brains.de
2012-11-06 17:11 ` jakub at gcc dot gnu.org
2012-11-08 10:19 ` sebastian.huber@embedded-brains.de
2012-11-08 20:10 ` jason at gcc dot gnu.org
2012-11-08 20:17 ` jakub at gcc dot gnu.org
2012-11-22 14:42 ` jason at gcc dot gnu.org
2012-11-22 16:24 ` paolo.carlini at oracle dot com
2012-12-06 14:38 ` jakub 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=bug-55137-4-4pWzakdUxK@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).