This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C/C++ PATCH to allow deprecating enum values (PR c/47043)
- From: Ed Smith-Rowland <3dw4rd at verizon dot net>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, polacek at redhat dot com, "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 06 May 2015 23:17:20 -0400
- Subject: Re: C/C++ PATCH to allow deprecating enum values (PR c/47043)
- Authentication-results: sourceware.org; auth=none
In addition to a PR this is 1/2 of a C=+17 feature. (The other half -
really a separate thing - is attributes on namespaces).
I wonder if we should pedwarn for < C++17?
Or it could be just an extension for < C++17 - I guess that would match
with clang.
if (SCOPED_ENUM_P (newtag))
diff --git gcc/cp/semantics.c gcc/cp/semantics.c
index 701a8eb..b46c6fc 100644
--- gcc/cp/semantics.c
+++ gcc/cp/semantics.c
@@ -3651,11 +3651,6 @@ finish_id_expression (tree id_expression,
}
}
- /* Handle references (c++/56130). */
- tree t = REFERENCE_REF_P (decl) ? TREE_OPERAND (decl, 0) : decl;
- if (TREE_DEPRECATED (t))
- warn_deprecated_use (t, NULL_TREE);
-
return decl;
}
Why did this bit get removed?
Do we handle enums in template specializations?
Ed