[Bug lto/51744] Erroneous warning: memset used with constant zero length parameter

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 21 09:00:00 GMT 2014


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It also (sadly) means this "works" with -fno-use-linker-plugin.  It also means
that not outputting the UNDEF into the LTO symbol table for this case doesn't
work as the executable will not link (we optimize the symbol away) if we don't
fold away the reference to it later.

I see no better way than either forcing the linker to re-scan needed symbols
and warn at a "second" stage only or to fold __builtin_constant_p earlier.



More information about the Gcc-bugs mailing list