This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/52518] New: gcc fails to find pch files in subincludes
- From: "casey at rodarmor dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Mar 2012 00:54:22 +0000
- Subject: [Bug pch/52518] New: gcc fails to find pch files in subincludes
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52518
Bug #: 52518
Summary: gcc fails to find pch files in subincludes
Classification: Unclassified
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: pch
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: casey@rodarmor.com
The attached script shows that gcc 4.5 doesn't use a pch if it is included
indirectly.
My reading of the documentation suggested that this should work, see
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html.
"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 #include."
On my system g++-mp-4.4 is version gcc 4.5.3 and g++-mp-4.5 is gcc version
4.4.6, both installed by macports.
All the best!