https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> --- Index: typeck2.c =================================================================== --- typeck2.c (revision 222767) +++ typeck2.c (working copy) @@ -959,10 +959,10 @@ check_narrowing (tree type, tree init, tsubst_flag else if (complain & tf_error) { global_dc->pedantic_errors = 1; - if (!pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, - "narrowing conversion of %qE from %qT to %qT " - "inside { }", init, ftype, type)) - ok = true; + pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, + "narrowing conversion of %qE from %qT to %qT " + "inside { }", init, ftype, type); + ok = true; global_dc->pedantic_errors = flag_pedantic_errors; } }