Re: [PATCH] PR c++/54372 - unused attribute inactive on dependant entities

2012-09-25 Thread Jason Merrill
OK. Jason

Re: [PATCH] PR c++/54372 - unused attribute inactive on dependant entities

2012-09-25 Thread Dodji Seketeli
Jason Merrill writes: > On 09/20/2012 10:01 AM, Dodji Seketeli wrote: >> This is because in cplus_decl_attributes, save_template_attributes >> makes so that the 'unused' attribute is applied to its appertaining >> entity only at instantiation time. But then at parsing time >> maybe_warn_unused_l

Re: [PATCH] PR c++/54372 - unused attribute inactive on dependant entities

2012-09-24 Thread Jason Merrill
On 09/20/2012 10:01 AM, Dodji Seketeli wrote: This is because in cplus_decl_attributes, save_template_attributes makes so that the 'unused' attribute is applied to its appertaining entity only at instantiation time. But then at parsing time maybe_warn_unused_local_typedefs checks for TREE_USED b

[PATCH] PR c++/54372 - unused attribute inactive on dependant entities

2012-09-20 Thread Dodji Seketeli
Hello, In the example of this patch, gcc/g++ invoked with -Wunused-local-typedefs warns on dependant entities even when those are decorated with the 'unused' attribute. This is because in cplus_decl_attributes, save_template_attributes makes so that the 'unused' attribute is applied to its appert