From: mrs Date: Fri, 7 May 2010 17:34:31 +0000 (+0000) Subject: PR target/43708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fdda2e98fe54d51393884909bf3aaa557324378;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159164 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5467fa98d375..58a3276992b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-07 Iain Sandoe + + 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 * 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 862a1d1f4c08..bd7c987e7446 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;