------- Comment #5 from rguenth at gcc dot gnu dot org 2009-02-24 13:06 ------- This is a preprocessor bug. We should not use PCHs when it is not the very first preprocessing directive in the TU that opens it. Thus, doc/invoke.texi
" @item A precompiled header can't be used once the first C token is seen. You can have preprocessor directives before a precompiled header; you can even include a precompiled header from inside another header, so long as there are no C tokens before the @code{#include}. " is very overly optimistic about conditions a PCH is valid. Tom, do you have an idea where to best restrict the use of PCHs this way? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at redhat dot com Status|UNCONFIRMED |NEW Component|c++ |preprocessor Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2009-02-24 13:06:14 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38987