[Bug pending/64214] no warning for unused global
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 8 13:27:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64214
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The global variable is exported to other TUs where we can't see all uses.
Declare it 'static' and it works.
Warning for non-static unused decls would get too many false positives.
More information about the Gcc-bugs
mailing list