public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "evangelos at foutrelis dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
Date: Mon, 04 May 2015 16:22:00 -0000 [thread overview]
Message-ID: <bug-66007-4-Iu2efnG6Ni@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3535 bytes --]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007
Evangelos Foutras <evangelos at foutrelis dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |---
--- Comment #4 from Evangelos Foutras <evangelos at foutrelis dot com> ---
I'm afraid it's not fully fixed yet; using -Wno-error=narrowing will still
initialize all array elements to zero:
$ echo 'int foo[] = { 1, 0xFFFFFFFF, 3 };' | g++ -S -x c++ - -o - -std=c++11
-Wno-error=narrowing
.file ""
<stdin>:1:32: warning: narrowing conversion of â4294967295uâ from âunsigned
intâ to âintâ inside { } [-Wnarrowing]
.globl foo
.bss
.align 8
.type foo, @object
.size foo, 12
foo:
.zero 12
.ident "GCC: (GNU) 5.1.1 20150504"
.section .note.GNU-stack,"",@progbits
>From gcc-bugs-return-485429-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 04 16:25:50 2015
Return-Path: <gcc-bugs-return-485429-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30333 invoked by alias); 4 May 2015 16:25:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30285 invoked by uid 48); 4 May 2015 16:25:46 -0000
From: "evangelos at foutrelis dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
Date: Mon, 04 May 2015 16:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: evangelos at foutrelis dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created
Message-ID: <bug-66007-4-dpPYevBAPf@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00269.txt.bz2
Content-length: 602
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf007
Evangelos Foutras <evangelos at foutrelis dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35453|0 |1
is obsolete| |
--- Comment #5 from Evangelos Foutras <evangelos at foutrelis dot com> ---
Created attachment 35458
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id5458&actioníit
Different narrowing behavior between GCC 4.9 and GCC 5 (with
-Wno-error=narrowing)
next prev parent reply other threads:[~2015-05-04 16:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 14:13 [Bug c++/66007] New: " evangelos at foutrelis dot com
2015-05-04 14:34 ` [Bug c++/66007] " trippels at gcc dot gnu.org
2015-05-04 14:50 ` trippels at gcc dot gnu.org
2015-05-04 16:10 ` jakub at gcc dot gnu.org
2015-05-04 16:22 ` evangelos at foutrelis dot com [this message]
2015-05-04 16:31 ` [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing trippels at gcc dot gnu.org
2015-05-04 16:33 ` paolo.carlini at oracle dot com
2015-05-04 16:34 ` paolo.carlini at oracle dot com
2015-05-04 16:40 ` jakub at gcc dot gnu.org
2015-05-04 17:46 ` paolo.carlini at oracle dot com
2015-05-04 20:59 ` paolo at gcc dot gnu.org
2015-05-04 20:59 ` paolo at gcc dot gnu.org
2015-05-04 21:23 ` paolo.carlini at oracle 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-66007-4-Iu2efnG6Ni@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).