This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/38987] Including a precompiled header from another header causes invalid assembly to be generated
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2009 13:06:14 -0000
- Subject: [Bug preprocessor/38987] Including a precompiled header from another header causes invalid assembly to be generated
- References: <bug-38987-17234@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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