This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Precompiled headers - still useful feature?
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Markus Trippelsdorf <markus at trippelsdorf dot de>, Martin LiÅka <mliska at suse dot cz>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 31 May 2015 19:54:12 +0200
- Subject: Re: Precompiled headers - still useful feature?
- Authentication-results: sourceware.org; auth=none
- References: <55657CCE dot 6090006 at suse dot cz> <20150527090139 dot GA7725 at x4> <CAH6eHdTum=CXedT5eOa+XhTaYpHX=m_Pm+jRQq_eTVCUAyo0Uw at mail dot gmail dot com>
On Wed, May 27, 2015 at 10:44:20AM +0100, Jonathan Wakely wrote:
> On 27 May 2015 at 10:01, Markus Trippelsdorf wrote:
> > And until C++ modules are implemented (unfortunately nobody is working
> > on this AFAIK) pch is still the only option left. So deprecating them
> > now seem premature.
>
> I doubt anyone's going to implement them until they're specified, the
> proposals are still evolving.
Also from user perspective precompiled headers are clumsy and
error-prone interface. Week ago I debugged a header and wasted hour
finding why there is problem in header, then finding that cpp x.c > Y.c
works but gcc x.c doesn't and it took me while to realize that I
accidentaly generated stale header.
These are feature that should be transparent. A better approach would be
create say 64mb cache with pch or whatever and use precompiled one from
cache unless it or depending files timestamps changed.