[Bug c/18624] GCC does not detect local variable set but never used

2011-08-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |4.6.0 --- Comment #30 from Andrew Pinski

[Bug c/18624] GCC does not detect local variable set but never used

2011-08-24 Thread alexander.herrmann at aiengine dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624 --- Comment #29 from alexander.herrmann at aiengine dot org 2011-08-24 19:21:47 UTC --- Dear Jakub, I just did try the example code with gcc 4.5.2. It plain c not c++. Some oldfashioned people still use c ;) Regards, Alexander J. Herrmann 2011/8

[Bug c/18624] GCC does not detect local variable set but never used

2011-08-24 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Bug c/18624] GCC does not detect local variable set but never used

2011-08-24 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624 --- Comment #27 from Bernhard Reutner-Fischer 2011-08-24 17:14:19 UTC --- FIXED? Seems that this is supported in c++ nowadays, thanks to dodji.

[Bug c/18624] GCC does not detect local variable set but never used

2010-05-05 Thread dodji at gcc dot gnu dot org
--- Comment #26 from dodji at gcc dot gnu dot org 2010-05-06 06:52 --- Subject: Bug 18624 Author: dodji Date: Thu May 6 06:52:30 2010 New Revision: 159096 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159096 Log: C++ support for -Wunused-but-set-variable gcc/cp/ChangeLog:

[Bug c/18624] GCC does not detect local variable set but never used

2010-04-15 Thread jakub at gcc dot gnu dot org
--- Comment #25 from jakub at gcc dot gnu dot org 2010-04-16 06:58 --- C++ still doesn't support this warning, so not yet. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624

[Bug c/18624] GCC does not detect local variable set but never used

2010-04-15 Thread manu at gcc dot gnu dot org
--- Comment #24 from manu at gcc dot gnu dot org 2010-04-15 19:32 --- @Jakub, is this FIXED? Could you document this new option in GCC 4.6 changes.html? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624

[Bug c/18624] GCC does not detect local variable set but never used

2010-04-07 Thread jakub at gcc dot gnu dot org
--- Comment #23 from jakub at gcc dot gnu dot org 2010-04-07 20:34 --- Subject: Bug 18624 Author: jakub Date: Wed Apr 7 20:33:36 2010 New Revision: 158086 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158086 Log: PR c/18624 * tree.h (DECL_READ_P): Define.

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-30 Thread jakub at gcc dot gnu dot org
--- Comment #22 from jakub at gcc dot gnu dot org 2009-11-30 13:56 --- In that case you weren't using the latest version of the patch. Please try http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01582.html instead, it should fix several important bugs and initializers of compound literals ar

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-30 Thread dcb314 at hotmail dot com
--- Comment #21 from dcb314 at hotmail dot com 2009-11-30 11:30 --- (In reply to comment #18) > http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01392.html I tried out your patch on a recent Linux kernel and got some possibly false positives Code like static inline pud_t __pud(pudval_t va

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-25 Thread jakub at gcc dot gnu dot org
--- Comment #20 from jakub at gcc dot gnu dot org 2009-11-25 18:28 --- That's on purpose. b is actually used by assignment to a in both cases, c is used in the first case by assignment to b. If the user decides to remove the a variable (resp. c in the second case) based on this warning

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-25 Thread aldot at gcc dot gnu dot org
--- Comment #19 from aldot at gcc dot gnu dot org 2009-11-25 18:15 --- (In reply to comment #18) > http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01392.html > Wunused-var-1.c has these two tests: void f1 (void) { int a;/* { dg-warning "set but not used" } */ int b; int c;

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-25 Thread jakub at gcc dot gnu dot org
--- Comment #18 from jakub at gcc dot gnu dot org 2009-11-25 08:59 --- http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01392.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-24 Thread jakub at gcc dot gnu dot org
--- Comment #17 from jakub at gcc dot gnu dot org 2009-11-24 11:38 --- http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01338.html is an example where the warning would be very useful, we create GC garbage uselessly... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624

[Bug c/18624] GCC does not detect local variable set but never used

2009-11-24 Thread jakub at gcc dot gnu dot org
--- Comment #16 from jakub at gcc dot gnu dot org 2009-11-24 11:36 --- *** Bug 36390 has been marked as a duplicate of this bug. *** -- jakub at gcc dot gnu dot org changed: What|Removed |Added --

[Bug c/18624] GCC does not detect local variable set but never used

2009-08-04 Thread manu at gcc dot gnu dot org
--- Comment #15 from manu at gcc dot gnu dot org 2009-08-04 10:52 --- (In reply to comment #14) > (In reply to comment #13) > > > We need someone to write the patch. Just that. > > I've got some spare time now, so I'd like to have a go. If you want your code to be useful, fill a copyr

[Bug c/18624] GCC does not detect local variable set but never used

2009-06-11 Thread dcb314 at hotmail dot com
--- Comment #14 from dcb314 at hotmail dot com 2009-06-11 12:57 --- (In reply to comment #13) > We need someone to write the patch. Just that. I've got some spare time now, so I'd like to have a go. I can see that used_flag bitfield can be expanded from 1 bit to 2 bits. I can see that

[Bug c/18624] GCC does not detect local variable set but never used

2009-01-30 Thread manu at gcc dot gnu dot org
--- Comment #13 from manu at gcc dot gnu dot org 2009-01-30 16:11 --- (In reply to comment #12) > > For source codes [a-k]*, there where 906 occurrences of the "set but > not used" warning from Intel C/C++. > @dcb I think nobody is discussing that we would want such warning (in some

[Bug c/18624] GCC does not detect local variable set but never used

2009-01-30 Thread dcb314 at hotmail dot com
--- Comment #12 from dcb314 at hotmail dot com 2009-01-30 13:48 --- (In reply to comment #1) > Yes this would be slightly useful but one has to be care full of what is > warned about. Agreed. For a first cut, a simple straight forward job, without considering the complex cases, could b

[Bug c/18624] GCC does not detect local variable set but never used

2008-06-27 Thread aldot at gcc dot gnu dot org
--- Comment #11 from aldot at gcc dot gnu dot org 2008-06-27 13:04 --- should we - add a bit so that used_flags:2 and set TREE_USED() = 2 in expand_assignment(), expand_expr_real_1, adjust setting tree addressable(decl)=!!TREE_USED(decl), set it in gimplify_modify_expr_rhs() for vars th

[Bug c/18624] GCC does not detect local variable set but never used

2008-06-26 Thread ghazi at gcc dot gnu dot org
--- Comment #10 from ghazi at gcc dot gnu dot org 2008-06-26 20:52 --- *** Bug 16517 has been marked as a duplicate of this bug. *** -- ghazi at gcc dot gnu dot org changed: What|Removed |Added --

[Bug c/18624] GCC does not detect local variable set but never used

2007-05-03 Thread pinskia at gcc dot gnu dot org
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-05-03 16:52 --- *** Bug 31795 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug c/18624] GCC does not detect local variable set but never used

2005-11-02 Thread alexander_herrmann at yahoo dot com dot au
--- Comment #8 from alexander_herrmann at yahoo dot com dot au 2005-11-02 11:29 --- I guessed somebody found it before but searching the db I couldn'n find it. Anyway shouldn't we make it than dependend or blocking Bug #tree-optimization/21513 As the funktion while C correct will never

[Bug c/18624] GCC does not detect local variable set but never used

2005-11-01 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2005-11-01 14:22 --- *** Bug 24611 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added ---