PR c++/78244 - narrowing conversion in template not detected.
authorMarek Polacek <polacek@redhat.com>
Wed, 16 Jan 2019 15:58:34 +0000 (15:58 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 16 Jan 2019 15:58:34 +0000 (15:58 +0000)
commit2ea2a74dceda4b4ddf7433f2c1d9ab72aa2bd0b0
treeeb3f5539cfe6d102414e395de229deae883a1283
parent647c5e3ea774f96c7f84b3ebacf1cb180aa2fbc5
PR c++/78244 - narrowing conversion in template not detected.

* call.c (perform_implicit_conversion_flags): Set
IMPLICIT_CONV_EXPR_BRACED_INIT.
* cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
* pt.c (tsubst_copy_and_build): Use it.

* g++.dg/cpp0x/Wnarrowing13.C: New test.
* g++.dg/cpp0x/Wnarrowing14.C: New test.

From-SVN: r267976
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wnarrowing13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/Wnarrowing14.C [new file with mode: 0644]