Commit 98c26210 by Paolo Carlini Committed by Paolo Carlini

re PR c++/84533 (ICE with duplicate enum value)

/cp
2018-02-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84533
	* decl.c (redeclaration_error_message): Don't try to use
	DECL_DECLARED_CONSTEXPR_P on CONST_DECLs.

/testsuite
2018-02-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84533
	* g++.dg/cpp1z/pr84533.C: New.

From-SVN: r257991
parent 856c79ea
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84533
* decl.c (redeclaration_error_message): Don't try to use
DECL_DECLARED_CONSTEXPR_P on CONST_DECLs.
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
* lambda.c (build_capture_proxy): Define static.
* cp-tree.h (build_capture_proxy): Remove.
......
......@@ -2919,6 +2919,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
specifier is declaration rather than definition (and
deprecated). */
if (cxx_dialect >= cxx17
&& VAR_P (olddecl)
&& DECL_CLASS_SCOPE_P (olddecl)
&& DECL_DECLARED_CONSTEXPR_P (olddecl)
&& !DECL_INITIAL (newdecl))
......
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84533
* g++.dg/cpp1z/pr84533.C: New.
2018-02-26 Marek Polacek <polacek@redhat.com>
PR c++/84537
......
// { dg-options "-std=c++17" }
enum E { e, e }; // { dg-error "redefinition" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment