Well, I haven't run into it w/ CW yet (haven't
really gotten into writing for the Pilot yet), but
based on my Microsoft experience, precompiled
headers are a Bad Thing (tm).

In the subject under discussion, where someone
wanted to disable the floating point traps, he
defined the symbol

#define _DONT_USE_FP_TRAPS_ 1

Now, somewhere in the .h files there is presumably
a conditional like 

#if _DONT_USE_FP_TRAPS_
/* fp routine prototypes */
#else
/* fp trap prototypes */
#endif

But if you are using precompiled headers,
you don't actually refer to the .h files, you
refer to a pre-digested version that presumably
has symbol tables & such already pre-built based
on the headers (I don't really know what goes
into precompiled header databases, but symbol
tables seems like a good guess).

The problem with this is that if the pre-digested
version was created with different conditionals,
you'll never see the effect you're after unless
you somehow force it to regenerate the precompiled
header database.  The compiler is supposed to be
smart enough to recognize when something that
requires this to be done has changed, but the key
phrase in that sentance is "supposed to be".  In
my experience they never are, causing endless
hours of trying to track down nonexistant bugs
in your code when the real bug is just that the
conditionals you have set up are not being honored
by the compiler.

My advice: never use precompiled headers.  Compilation
times may be marginally longer, but you'll know what
you're getting.

-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!


> -----Original Message-----
> From: Michael S. Davis [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 24, 1999 7:02 AM
> To: [EMAIL PROTECTED]
> Subject: GCC: Couple of Generic questions
> 
> 
> 
> It just occurred to me that I do not have a pilot.h
> header included in my program.  But it compiles just
> fine.  
> 
> When is it necessary?
> 
> Also, how important or rather what is the purpose
> of PILOT_PRECOMPILED_HEADERS_OFF.  I know that it 
> controls using precompiled headers (duh!).  But
> what are the implications if one does or does not
> use this? I don't, yet.  Should I use it?
> 
> 
> 
> ----------------------------------------------------
> Shoot-to-Win
> 
> Protect the 2nd Amendment
> ----------------------------------------------------
> 
> 

Reply via email to