C++ PATCH for c++/51827 (mangling error with PCH and LTO)

Richard Guenther richard.guenther@gmail.com
Tue Jan 17 14:43:00 GMT 2012


On Tue, Jan 17, 2012 at 2:23 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jan 17, 2012 at 04:35, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>
>> +  /* Disable LTO output when outputting a precompiled header.  */
>> +  if (pch_file && flag_lto)
>> +    {
>> +      flag_lto = 0;
>> +      flag_generate_lto = 0;
>> +    }
>> +
>
> Emit a warning when you do this?

Well, I'd say peoples Makefiles may not strip -flto properly here (you need to
pass optimization level for example), so I'm not sure that would be good QOI.

> I think we should issue a diagnostic about the combination of these
> two flags.  Silent ignorance would lead to false user expectations
> and supposed "bug" reports, if not confusion.

I'm not sure what "expectation" there would be?

OTOH the bug is fixed by Jason, so we can just do nothing.

Richard.



More information about the Gcc-patches mailing list