mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/28559 (ICE with friend and __attribute__)
PR c++/28559
* parser.c (cp_parser_elaborated_type_specifier): Also ignore
attributes applied to a TYPENAME_TYPE.
From-SVN: r116137
This commit is contained in:
parent
96ff6c8cc0
commit
abab460491
|
|
@ -1,3 +1,9 @@
|
|||
2006-08-11 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/28559
|
||||
* parser.c (cp_parser_elaborated_type_specifier): Also ignore
|
||||
attributes applied to a TYPENAME_TYPE.
|
||||
|
||||
2006-08-09 Lee Millward <lee.millward@codesourcery.com>
|
||||
|
||||
PR c++/28637
|
||||
|
|
|
|||
|
|
@ -10268,7 +10268,10 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
|
|||
/* Allow attributes on forward declarations of classes. */
|
||||
if (attributes)
|
||||
{
|
||||
if (tag_type != enum_type && CLASSTYPE_TEMPLATE_INSTANTIATION (type)
|
||||
if (TREE_CODE (type) == TYPENAME_TYPE)
|
||||
warning (OPT_Wattributes,
|
||||
"attributes ignored on uninstantiated type");
|
||||
else if (tag_type != enum_type && CLASSTYPE_TEMPLATE_INSTANTIATION (type)
|
||||
&& ! processing_explicit_instantiation)
|
||||
warning (OPT_Wattributes,
|
||||
"attributes ignored on template instantiation");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
// PR c++/28559
|
||||
|
||||
template<typename T> struct A
|
||||
{
|
||||
struct B;
|
||||
};
|
||||
|
||||
struct C
|
||||
{
|
||||
template<typename T> friend struct __attribute__((packed)) A<T>::B; // { dg-warning "uninstantiated" }
|
||||
};
|
||||
Loading…
Reference in New Issue