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: r185710
This commit is contained in:
parent
6edb7180d2
commit
d7788b60ae
|
@ -1,3 +1,9 @@
|
|||
2012-03-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/52671
|
||||
* decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
|
||||
on CLASS_TYPE_P types.
|
||||
|
||||
2012-03-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/52582
|
||||
|
|
|
@ -4219,7 +4219,8 @@ check_tag_decl (cp_decl_specifier_seq *declspecs)
|
|||
if (declspecs->attributes)
|
||||
{
|
||||
location_t loc = input_location;
|
||||
if (!CLASSTYPE_TEMPLATE_INSTANTIATION (declared_type))
|
||||
if (!CLASS_TYPE_P (declared_type)
|
||||
|| !CLASSTYPE_TEMPLATE_INSTANTIATION (declared_type))
|
||||
/* For a non-template class, use the name location; for a template
|
||||
class (an explicit instantiation), use the current location. */
|
||||
input_location = location_of (declared_type);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-03-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/52671
|
||||
* g++.dg/ext/attrib44.C: New test.
|
||||
|
||||
2012-03-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/torture/pr52582.C: New.
|
||||
|
|
Loading…
Reference in New Issue