This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]