parser.c (cp_parser_explicit_instantiation): Give a warning for ignored attributes on explicit class instantiation.
* parser.c (cp_parser_explicit_instantiation): Give a warning for ignored attributes on explicit class instantiation. From-SVN: r184254
This commit is contained in:
parent
aa434b3d4d
commit
7f3dee0e1c
@ -1,3 +1,8 @@
|
||||
2012-02-14 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* parser.c (cp_parser_explicit_instantiation): Give a warning
|
||||
for ignored attributes on explicit class instantiation.
|
||||
|
||||
2012-02-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/52247
|
||||
|
@ -13122,6 +13122,9 @@ cp_parser_explicit_instantiation (cp_parser* parser)
|
||||
tree type;
|
||||
|
||||
type = check_tag_decl (&decl_specifiers);
|
||||
if (decl_specifiers.attributes)
|
||||
warning (OPT_Wattributes,
|
||||
"attributes ignored on explicit type instantiation");
|
||||
/* Turn access control back on for names used during
|
||||
template instantiation. */
|
||||
pop_deferring_access_checks ();
|
||||
|
@ -1,3 +1,7 @@
|
||||
2012-02-14 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/ext/attrib43.C: New.
|
||||
|
||||
2012-02-14 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* lib/target-supports.exp (check_effective_target_fgnu_tm): New
|
||||
|
5
gcc/testsuite/g++.dg/ext/attrib43.C
Normal file
5
gcc/testsuite/g++.dg/ext/attrib43.C
Normal file
@ -0,0 +1,5 @@
|
||||
template <class T> struct A { };
|
||||
|
||||
template
|
||||
__attribute__ ((packed))
|
||||
struct A<int>; // { dg-warning "attributes ignored" }
|
Loading…
Reference in New Issue
Block a user