diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2010-05-07 17:34:31 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2010-05-07 17:34:31 +0000 |
commit | 3bd5cdeb0e00feb040e5611e584509db27eeebf8 (patch) | |
tree | 6a391fac3bf9e7c3d212062ad8e30499a91a1f68 /gcc | |
parent | 9bf4598b0df6d72a5b10dc3acf82034c42d0e220 (diff) | |
download | gcc-3bd5cdeb0e00feb040e5611e584509db27eeebf8.zip gcc-3bd5cdeb0e00feb040e5611e584509db27eeebf8.tar.gz gcc-3bd5cdeb0e00feb040e5611e584509db27eeebf8.tar.bz2 |
re PR target/43708 (gcc.dg/pragma-darwin.c "set not used", not working with pragma)
PR target/43708
* config/darwin-c.c (darwin_pragma_unused): Set DECL_READ_P
in addition to TREE_USED, to avoid "set but unused" warnings.
From-SVN: r159164
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/darwin-c.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5467fa9..58a3276 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-07 Iain Sandoe <iains@gcc.gnu.org> + + PR target/43708 + * config/darwin-c.c (darwin_pragma_unused): Set DECL_READ_P + in addition to TREE_USED, to avoid "set but unused" warnings. + 2010-05-07 Changpeng Fang <changpeng.fang@amd.com> * tree-ssa-loop-prefetch.c (TRIP_COUNT_TO_AHEAD_RATIO): New. diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 862a1d1..bd7c987 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -144,7 +144,10 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) tree local = lookup_name (decl); if (local && (TREE_CODE (local) == PARM_DECL || TREE_CODE (local) == VAR_DECL)) - TREE_USED (local) = 1; + { + TREE_USED (local) = 1; + DECL_READ_P (local) = 1; + } tok = pragma_lex (&x); if (tok != CPP_COMMA) break; |