> I can't reproduce it on x86_64-linux-gnu. What is your architecture? Ups, I forgot to mention one more flag "-O" which is important here. So building instructions should be like this with the same code: $ g++ -c 1.cpp -O -flto -fno-semantic-interposition -fPIC $ g++ -c 2.cpp -O -flto -fno-semantic-interposition -fPIC $ g++ 1.o 2.o I tried this on two PCs, both x86_64-linux-gnu (Ubuntu and NixOS), on both of them it produces the warning. I also just found out that it compiles fine on gcc5 (5.4.1 20160904).