This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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 that are not init-self, expand_one_var() etc.
or
- warn on has_zero_uses() in something like ccp?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]