Commit b7d56bdf by Uros Bizjak Committed by Uros Bizjak

re PR objc++/53441 (obj-c++.dg/ivar-invalid-type-1.mm ICE)

	PR obj-c++/53441
	* decl.c (grokdeclarator): Check that current_class_type is non-NULL
	before calling constructor_name_p.

From-SVN: r187888
parent 7be9eece
2012-05-24 Uros Bizjak <ubizjak@gmail.com>
PR obj-c++/53441
* decl.c (grokdeclarator): Check that current_class_type is non-NULL
before calling constructor_name_p.
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32080
......
......@@ -9803,7 +9803,8 @@ grokdeclarator (const cp_declarator *declarator,
clones. */
DECL_ABSTRACT (decl) = 1;
}
else if (constructor_name_p (unqualified_id, current_class_type))
else if (current_class_type
&& constructor_name_p (unqualified_id, current_class_type))
permerror (input_location, "ISO C++ forbids nested type %qD with same name "
"as enclosing class",
unqualified_id);
......
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