[Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Mon May 4 16:33:00 GMT 2015


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.



More information about the Gcc-bugs mailing list