re PR c++/71665 (ICE on invalid C++ code with non-integral constant enumerator value...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 28 Jul 2016 18:43:29 +0000 (18:43 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 28 Jul 2016 18:43:29 +0000 (18:43 +0000)
commitf064da6af5b5a348dce6eacb2ac72062bfdf12b7
tree6847e4bd2b5fc440f6bd243f9bd23f4b7017b5be
parent1b70aaad4c090c90d69c514138a8c157af930b57
re PR c++/71665 (ICE on invalid C++ code with non-integral constant enumerator value: in cxx_eval_constant_expression, at cp/constexpr.c:3918)

/cp
2016-07-28  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71665
* decl.c (build_enumerator): Check the type of the enumerator before
calling cxx_constant_value.

/testsuite
2016-07-28  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71665
* g++.dg/cpp0x/pr71665-1.C: New.
* g++.dg/cpp0x/pr71665-2.C: Likewise.
* g++.dg/cpp0x/enum29.C: Adjust dg-error string.
* g++.dg/ext/label10.C: Likewise.
* g++.dg/parse/constant5.C: Likewise.

From-SVN: r238828
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/enum29.C
gcc/testsuite/g++.dg/cpp0x/pr71665-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr71665-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/label10.C
gcc/testsuite/g++.dg/parse/constant5.C