[Bug c/59801] GCC does not warn on unused global variable

2014-01-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #9 from Jakub Jelinek --- It is IMHO working correctly and looks like clang bug to me.

[Bug c/59801] GCC does not warn on unused global variable

2014-01-16 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #8 from Zhendong Su --- (In reply to Jakub Jelinek from comment #7) > Those two cases are different, the other PR was about automatic volatile > variables, where if they are unused it is really hard to come up with a way > how they cou

[Bug c/59801] GCC does not warn on unused global variable

2014-01-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #7 from Jakub Jelinek --- Those two cases are different, the other PR was about automatic volatile variables, where if they are unused it is really hard to come up with a way how they could be modified behind compiler's back. While fo

[Bug c/59801] GCC does not warn on unused global variable

2014-01-15 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #6 from Zhendong Su --- > *** This bug has been marked as a duplicate of bug 57258 *** Andrew, I'm confused. The two are different, right? 57258 is about a possible extra warning, and this one is about a missing warning. What did I

[Bug c/59801] GCC does not warn on unused global variable

2014-01-15 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #5 from Andrew Pinski --- This change was done on purpose. See the patch and thread at http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00847.html

[Bug c/59801] GCC does not warn on unused global variable

2014-01-15 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 Andrew Pinski changed: What|Removed |Added Resolution|INVALID |DUPLICATE --- Comment #4 from Andrew Pins

[Bug c/59801] GCC does not warn on unused global variable

2014-01-15 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 Zhendong Su changed: What|Removed |Added CC||su at cs dot ucdavis.edu --- Comment #3 fro

[Bug c/59801] GCC does not warn on unused global variable

2014-01-14 Thread chengniansun at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 --- Comment #2 from Chengnian Sun --- Thanks for your reply. One more question regarding this issue. Support I have a closed program static volatile int a; int main() {return 0;} Even though "a" is not read anywhere in this program, do you mean

[Bug c/59801] GCC does not warn on unused global variable

2014-01-14 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|