Index: cp/typeck2.c =================================================================== --- cp/typeck2.c (revision 222628) +++ cp/typeck2.c (working copy) @@ -959,9 +959,10 @@ check_narrowing (tree type, tree init, tsubst_flag else if (complain & tf_error) { global_dc->pedantic_errors = 1; - pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, - "narrowing conversion of %qE from %qT to %qT inside { }", - init, ftype, type); + 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; global_dc->pedantic_errors = flag_pedantic_errors; } } Index: testsuite/g++.dg/cpp0x/Wnarrowing4.C =================================================================== --- testsuite/g++.dg/cpp0x/Wnarrowing4.C (revision 0) +++ testsuite/g++.dg/cpp0x/Wnarrowing4.C (working copy) @@ -0,0 +1,6 @@ +// PR c++/65858 +// { dg-do compile { target c++11 } } +// { dg-require-effective-target lto } +// { dg-options "-flto -Wno-narrowing" } + +int x { 0.5 };