This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with PFE approach [Was: Faster compilation speed]
- From: Devang Patel <dpatel at apple dot com>
- To: "Timothy J. Wood" <tjw at omnigroup dot com>
- Cc: dberlin at dberlin dot org, Mike Stump <mrs at apple dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 19 Aug 2002 11:59:50 -0700
- Subject: Re: Problem with PFE approach [Was: Faster compilation speed]
On Saturday, August 17, 2002, at 08:14 PM, Timothy J. Wood wrote:
The way I think about this is that the prefix header mess is just a
hack to avoid having a #include at the top of each file. There should
be nothing else special about the header -- it is just assumed that
there is a #include at the top of your file.
If a header is included in prefix header then one does not need
to #include that header again in source. By loading PFE, you're
essentially instructing compiler to include that header from
prefix header.
Ideally compiler should complain with re-definition errors, if
the header is included again in source file. But that would
require massive amount of change in existing projects to adopt PFE.
So right now compiler skips #includes for headers that are already
loaded from PFE.
-Devang