https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
--- Comment #54 from Rich Felker <bugdal at aerifal dot cx> --- I don't think name detection is a reasonable solution to this problem. It won't solve anything when there's an intermediate call where you'd get indirect recursion. The right solution here is always honoring -ffreestanding, never emitting calls to string functions in freestanding mode, and insisting that anyone writing their own (re)implementation of the standard string functions use -ffreestanding.