This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/38987] Including a precompiled header from another header causes invalid assembly to be generated



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]