Commit ba19e12f by Paolo Carlini Committed by Paolo Carlini

re PR c++/35077 (ICE with attribute in broken class declaration)

cp/
2008-02-11  Paolo Carlini  <pcarlini@suse.de>

	PR c++/35077
	* decl.c (groktypename): Check grokdeclarator return.

testsuite/
2008-02-11  Paolo Carlini  <pcarlini@suse.de>

	PR c++/35077
	* g++.dg/template/crash78.C: New.

From-SVN: r132237
parent 35b35fd0
2008-02-11 Paolo Carlini <pcarlini@suse.de>
PR c++/35077
* decl.c (groktypename): Check grokdeclarator return.
2008-02-10 Jason Merrill <jason@redhat.com>
PR c++/34094
......
......@@ -3914,7 +3914,7 @@ groktypename (cp_decl_specifier_seq *type_specifiers,
attrs = type_specifiers->attributes;
type_specifiers->attributes = NULL_TREE;
type = grokdeclarator (declarator, type_specifiers, TYPENAME, 0, &attrs);
if (attrs)
if (attrs && type != error_mark_node)
{
if (CLASS_TYPE_P (type))
warning (OPT_Wattributes, "ignoring attributes applied to class type %qT "
......
2008-02-11 Paolo Carlini <pcarlini@suse.de>
PR c++/35077
* g++.dg/template/crash78.C: New.
2008-02-11 Uros Bizjak <ubizjak@gmail.com>
PR testsuite/35047
// PR c++/35077
template<typename=int struct A __attribute((aligned(4))); // { dg-error "declaration|expected" }
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