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: unassig...@gcc.gnu.org ReportedBy: ca...@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!