diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-28 13:32:41 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-28 13:32:41 +0000 |
commit | 71893c98c1745cd6fde434088f876087572961aa (patch) | |
tree | 7928841298b3d0e441ba635912fde0644eea753a /libgo/go/runtime/pprof/pprof.go | |
parent | 48b74882d1b2639b02884681a82aa2be592052b2 (diff) | |
download | ppe42-gcc-71893c98c1745cd6fde434088f876087572961aa.tar.gz ppe42-gcc-71893c98c1745cd6fde434088f876087572961aa.zip |
PR c++/54372 - unused attribute inactive on dependant entities
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 appertaining
entity only at instantiation time. But then at parsing time
maybe_warn_unused_local_typedefs checks for TREE_USED before warning.
This patch applies the 'unused' attribute at compilation time.
Tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* decl2.c (is_late_template_attribute): "unused" attribute is to
be applied at compile time.
gcc/testsuite/
* c-c++-common/Wunused-local-typedefs-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191830 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/runtime/pprof/pprof.go')
0 files changed, 0 insertions, 0 deletions