re PR c++/82307 (unscoped enum-base incorrect cast)
authorMukesh Kapoor <mukesh.kapoor@oracle.com>
Tue, 24 Oct 2017 13:49:13 +0000 (13:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 24 Oct 2017 13:49:13 +0000 (13:49 +0000)
commiteab01c18fdf287aaac60224ddbecae6574631b7b
treea153300f80986f5e3b972aed4c6ff2aecf8675b5
parentd56a36834f29373f80776c43e98c3813271d6bc1
re PR c++/82307 (unscoped enum-base incorrect cast)

/cp
2017-10-24  Mukesh Kapoor  <mukesh.kapoor@oracle.com>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82307
* cvt.c (type_promotes_to): Implement C++17, 7.6/4, about unscoped
enumeration type whose underlying type is fixed.

/testsuite
2017-10-24  Mukesh Kapoor  <mukesh.kapoor@oracle.com>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82307
* g++.dg/cpp0x/enum35.C: New.
* g++.dg/cpp0x/enum36.C: Likewise.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r254046
gcc/cp/ChangeLog
gcc/cp/cvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/enum35.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/enum36.C [new file with mode: 0644]