re PR c++/52671 (ICE with misplaced attribute on enum)

PR c++/52671
	* decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
	on CLASS_TYPE_P types.

	* g++.dg/ext/attrib44.C: New test.

From-SVN: r185711
This commit is contained in:
Jakub Jelinek 2012-03-22 21:29:01 +01:00
parent d7788b60ae
commit f145179afe
1 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,4 @@
// PR c++/52671
// { dg-do compile }
__attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" }
// { dg-message "must follow the" "" { target *-*-* } 3 }