This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PCH] Automatic PCH creation model
Karel Gardas wrote:-
> I would like to ask if anybody is working on automatic PCH creation - like
> it is working in Comeau's C/C++ compiler and IIRC in Borland's C++
> compiler. e.g. let's have some options which directs usage of pch -
> ``--pch'' and ``--pch_dir'', then for example
>
> c++ <params> --pch -c a.cc
>
> will create a.pch in the same dir like it creates a.o. Also if the next
> command is:
>
> c++ <params> --pch -c b.cc
>
> and the a.pch is suitable for reuse in b.cc compilation, then it is used.
> If it is not, then b.pch is created. In the process of source unification,
> there are some #pragmas which might be used to directs pch processing,
> like #pragma hdrstop and #pragma no_pch. In case of #pragma no_pch, pch
> usage will be disabled for this file and in case of #pragma hdrstop, pch
> processing - i.e. the set of include files till the #pragma hdrstop will
> be used to find the best matching pch file. More about this scenario is
> written in como documentation on
> http://www.comeaucomputing.com/4.0/docs/userman/pch.html.
Indeed. I much prefer this model (it's specified if nothing else!) and
said so in Jan 2001. Sadly the PCH implementation went down a different
road.
Neil.