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 pch/52518] New: gcc fails to find pch files in subincludes


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!


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