On 11 June 2010 21:41, Manuel López-Ibáñez <lopeziba...@gmail.com> wrote: > On 11 June 2010 20:48, Cary Coutant <ccout...@google.com> wrote: >>> But if I understand correctly, mixed LTO/non-LTO + whole-program is >>> almost never correct. So we should really emit a warning for this >>> specific combination. I think making this mistake would be quite easy >>> but hard to debug. >> >> The plugin interface was designed to provide this essential >> information to the compiler about all the non-LTO code; until Gnu ld >> implements this or the collect2 interface provides something similar, >> you're simply working with an incomplete implementation, and you'll >> have to live with the limitations.
Personally, I rather have GCC warn every time that using LTO (or any other option) may lead to miscompilation than find out later that my program is behaving strange. A warning is a limitation I can live with. Wrong results from perfectly valid programs, not so nice. Manuel.