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: jepler at unpythonic dot net
- Cc: dberlin at dberlin dot org, gcc at gcc dot gnu dot org
- Date: Mon, 19 Aug 2002 11:50:24 -0700
- Subject: Re: Problem with PFE approach [Was: Faster compilation speed]
On Monday, August 19, 2002, at 06:26 AM, jepler@unpythonic.net wrote:
The following set of files will compile a program with or without PFE, but
using a PFE that contains both a.h and b.h, the behavior will change.
This is not implementation problem or PFE model problem.
If you are including a.h and b.h in PFE means what you're asking compiler to do
is to compile following source
/// m.c
#include "a.h"
#include "b.h"
int main(void) {
#ifdef DEFB
return 1;
#else
return 0;
#endif;
}
And, no doubt, it can have different behavior then following original source
// m.c
#include "a.h"
int main(void) {
#ifdef DEFB
return 1;
#else
return 0;
#endif;
}
-Devang
So
the suggestion that files should be checked that they compile without PFE
is not enough to ensure that there aren't unintended changes in program
meaning in the presence of PFE.
// a.h
#define DEFA
// b.h
#define DEFB
// m.c
#include "a.h"
int main(void) {
#ifdef DEFB
return 1;
#else
return 0;
#endif;
}