This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59801] GCC does not warn on unused global variable
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jan 2014 21:18:19 +0000
- Subject: [Bug c/59801] GCC does not warn on unused global variable
- Auto-submitted: auto-generated
- References: <bug-59801-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59801
--- Comment #8 from Zhendong Su <su at cs dot ucdavis.edu> ---
(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 could be modified behind compiler's back. While for this case,
> variable in .data/.bss etc. section it is not so hard, the variable has a
> name through which it can be referenced, eventhough only from within the
> same assembly file. User could inject some assembly which will access it,
> the var can use section attribute that places it into some magic section
> that is e.g. IO mapped, etc.
Thanks Jakub. So, this is confirmed then?