PR c++/90805 - detect narrowing in case values.
authorMarek Polacek <polacek@redhat.com>
Thu, 1 Aug 2019 16:27:04 +0000 (16:27 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 1 Aug 2019 16:27:04 +0000 (16:27 +0000)
commitf339eb66071559a02a0c05b3ee89fc8352969bc9
treec1268328a554cc53785e00df31c20caa2dfbf9fb
parent3a66e68ad92f7b4150e35e20e2bb22f777837b63
PR c++/90805 - detect narrowing in case values.

* decl.c (case_conversion): Detect narrowing in case values.

* c-c++-common/pr89888.c: Update expected dg-error.
* g++.dg/cpp0x/Wnarrowing17.C: New test.
* g++.dg/cpp0x/enum28.C: Update expected dg-error.

From-SVN: r273976
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr89888.c
gcc/testsuite/g++.dg/cpp0x/Wnarrowing17.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/enum28.C