re PR c++/82299 (-Wuseless-cast errors on typed enums used in member data initializer...
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Oct 2017 15:50:50 +0000 (17:50 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Oct 2017 15:50:50 +0000 (17:50 +0200)
commit7260f6f79cd3aea6580013d386ce0fd8696a6b19
treed3aecc72ca1ca9d2daa372193c889de08de7511a
parent681f18d19b56527329fc80e5fdb8ef534978f705
re PR c++/82299 (-Wuseless-cast errors on typed enums used in member data initializers in c++1z)

PR c++/82299
* decl.c (reshape_init): Suppress warn_useless_cast for direct enum
init.
* typeck.c (convert_for_assignment): Likewise.

* g++.dg/cpp0x/pr82299.C: New test.

From-SVN: r253495
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr82299.C [new file with mode: 0644]