This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 18747


On 08/23/2012 10:04 AM, Paolo Carlini wrote:
+    if (decl
+	&& TREE_CODE (decl) == VAR_DECL
+	&& ! TYPE_P (CP_DECL_CONTEXT (decl)))
+      {
+	error_at (decl_spec_token_start->location,
+		  "%qT is not a template type", TREE_TYPE (decl));
+	decl = error_mark_node;
+      }

Can we just check whether decl has DECL_TEMPLATE_INFO at this point?


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]