OK, thanks.
Hi,
On 03/06/2013 06:32 PM, Jason Merrill wrote:
On 03/06/2013 11:42 AM, Paolo Carlini wrote:
+/* NULL_TREE or error_mark_node (if decl is error_mark_node). */
+type = TREE_TYPE (decl);
I'd prefer to avoid taking the TREE_TYPE of some random thing. If
what we want is NULL_TREE or e
On 03/06/2013 11:42 AM, Paolo Carlini wrote:
+ /* NULL_TREE or error_mark_node (if decl is error_mark_node). */
+ type = TREE_TYPE (decl);
I'd prefer to avoid taking the TREE_TYPE of some random thing. If what
we want is NULL_TREE or error_mark_node, let's write that rather than
... in fact, we could safely add this tiny clean-up too.
Paolo.
///
Index: cp/decl.c
===
--- cp/decl.c (revision 196497)
+++ cp/decl.c (working copy)
@@ -11712,9 +11712,6 @@ check_elaborated_type_specifier (enum
On 03/06/2013 03:34 PM, Jason Merrill wrote:
It sounds like the underlying problem is that "decl" isn't a
TYPE_DECL. So let's check for that instead.
I see. Thus, also considering that the only other use of
check_elaborated_type_specifier happens when the decl is known to be a
TYPE_DECL, I tho
It sounds like the underlying problem is that "decl" isn't a TYPE_DECL.
So let's check for that instead.
Jason
Hi,
this (and 55786, which is a Dup) is an ICE on invalid regression in
4.7/4.8. The problem is that for such broken input,
check_elaborated_type_specifier is called by
cp_parser_elaborated_type_specifier with a DECL which has a nul
TREE_TYPE, a TEMPLATE_ID_EXPR actually, and therefore immedi