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/59801] GCC does not warn on unused global variable


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?


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