http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46449
--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-11-12 13:26:40 UTC --- >From the user point of view, linker and assembler are part of the compiler. So the question is whether the linker could detect this case. But I guess the standard answer is that GCC does not provide its own linker, so there is nothing GCC can do. On the other hand, since LLVM has its own linker, it would be interesting to know whether they detect this case (or whether they aim to detect it).