This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH [Was: Re: Target FUNCTION_{PRO,EPI}LOGUE question]
- To: Geoff Keating <geoffk at geoffk dot org>
- Subject: Re: PCH [Was: Re: Target FUNCTION_{PRO,EPI}LOGUE question]
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Mon, 2 Jul 2001 07:15:44 +0100
- Cc: gcc at gcc dot gnu dot org
Geoff Keating wrote:-
> OK, here's a high-level overview.
Thanks.
> The precompiled header mechanism works by:
>
> - `compiling' a header ('foo.h'), as if it was a normal .c file
> - just before finishing the compilation, saving GCC's state
> (including all interesting global variables, the contents of the .s
> file so far, and lots of other stuff) to a file named foo.h.pch
>
> - when a file is compiled, and cpplib looks for foo.h, if it also
> finds foo.h.pch, and if this is (more or less) the first thing
> in the compilation, it restores GCC's state to where it was before
> - and continues without including foo.h.
How do you handle conditional compilation that depends on earlier
macro definitions and / or command line switches?
Neil.