2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
PR c++/65858
* typeck2.c (check_narrowing): Set ok = true when pedwarn returns
false.
/testsuite
2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
PR c++/65858
* g++.dg/cpp0x/Wnarrowing4.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222699
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
+ Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
+
+ PR c++/65858
+ * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
+ false.
+
2015-04-30 David Malcolm <dmalcolm@redhat.com>
* cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
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;
}
}
+2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
+ Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
+
+ PR c++/65858
+ * g++.dg/cpp0x/Wnarrowing4.C: New.
+
2015-05-01 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* gcc.dg/20150120-1.c: New test.
--- /dev/null
+// PR c++/65858
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target lto }
+// { dg-options "-flto -Wno-narrowing" }
+
+int x { 0.5 };