* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
@ 2010-04-09 18:37 ` jakub at gcc dot gnu dot org
2010-04-09 19:24 ` iains at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-09 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2010-04-09 18:37 -------
Guess setting DECL_READ_P at the same spot as TREE_USED in config/darwin-c.c
could fix this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
2010-04-09 18:37 ` [Bug target/43708] " jakub at gcc dot gnu dot org
@ 2010-04-09 19:24 ` iains at gcc dot gnu dot org
2010-04-11 19:31 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 19:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from iains at gcc dot gnu dot org 2010-04-09 19:24 -------
(In reply to comment #1)
> Guess setting DECL_READ_P at the same spot as TREE_USED in config/darwin-c.c
> could fix this.
Yes, it does thanks the head up.
... is TREE_USED() redundant in this case?
(I've left it in place at the moment)
tested on i686-apple-darwin9 (but only off a stage3-bubble).
Index: gcc/config/darwin-c.c
===================================================================
--- gcc/config/darwin-c.c (revision 158165)
+++ gcc/config/darwin-c.c (working copy)
@@ -144,7 +144,10 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_
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;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
2010-04-09 18:37 ` [Bug target/43708] " jakub at gcc dot gnu dot org
2010-04-09 19:24 ` iains at gcc dot gnu dot org
@ 2010-04-11 19:31 ` rguenth at gcc dot gnu dot org
2010-04-11 19:53 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-11 19:31 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-04-11 19:31 ` rguenth at gcc dot gnu dot org
@ 2010-04-11 19:53 ` jakub at gcc dot gnu dot org
2010-04-14 15:08 ` iains at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-11 19:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-04-11 19:53 -------
TREE_USED is not redundant. The patch looks good to me, though I can't approve
it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-04-11 19:53 ` jakub at gcc dot gnu dot org
@ 2010-04-14 15:08 ` iains at gcc dot gnu dot org
2010-05-07 17:35 ` mrs at gcc dot gnu dot org
2010-05-07 17:35 ` mrs at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-14 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from iains at gcc dot gnu dot org 2010-04-14 15:08 -------
see :
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00535.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-04-14 15:08 ` iains at gcc dot gnu dot org
@ 2010-05-07 17:35 ` mrs at gcc dot gnu dot org
2010-05-07 17:35 ` mrs at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-05-07 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mrs at gcc dot gnu dot org 2010-05-07 17:35 -------
Thanks.
--
mrs at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/43708] [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma
2010-04-09 17:08 [Bug c/43708] New: [4.6 Regression] gcc.dg/pragma-darwin.c "set not used", not working with pragma iains at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-05-07 17:35 ` mrs at gcc dot gnu dot org
@ 2010-05-07 17:35 ` mrs at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-05-07 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mrs at gcc dot gnu dot org 2010-05-07 17:34 -------
Subject: Bug 43708
Author: mrs
Date: Fri May 7 17:34:31 2010
New Revision: 159164
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159164
Log:
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.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin-c.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43708
^ permalink raw reply [flat|nested] 8+ messages in thread