This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 May 2015 16:33:13 +0000
- Subject: [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
- Auto-submitted: auto-generated
- References: <bug-66007-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Unfortunately, I'm afraid it's a real issue. Note the test has
-Wno-error=narrowing, not -Wno-narrowing. Thus the pedwarn at typeck2.c:962
returns true and ok remains false while we only emitted a warning and the
compilation goes on. In other terms we have a variant of c++/65858. It may work
to simply set ok = true unconditionally, after all we do the same for the
previous pedwarn and in this case we are simply forcing -pedantic-errors,
something that can happen for any other pedwarn as a normal user provided
switch.