[Bug pch/91999] pch_open_file picks up a first found precompiled header even if it's not suitable
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 5 08:47:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91999
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
-Winvalid-pch is doing exactly what it should be doing based on what it is
documented to do:
Warn if a precompiled header (see Precompiled Headers) is found in the search
path but cannot be used.
In the C case, all.h.gch/.c is found first but it can be used so it does not
check others.
In the C++ case, all.h.gch/.c is found first and you have -Winvalid-pch on so
it warns (you have -Werror on so it changed to an error instead).
all.h.gch/.c++ is still used though :).
More information about the Gcc-bugs
mailing list