http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
--- Comment #29 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Rich Felker from comment #28) > On Tue, Apr 29, 2014 at 02:16:38PM +0000, rguenth at gcc dot gnu.org wrote: > > Honza, is there a more "fancy" way of doing this? > > The only correct way to fix this is to honor -ffreestanding and never > generate references to hosted-C functions (which include memset) when > -ffreestanding is used. Done that for 4.8+ now (bah, forgot to reference the PR in the changelog so the commits don't appear here). But I still like to fix the obvious wrong cases in some way.