This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tree.h vs include guard


Stan Shebs wrote:-

> I thought the current policy was only to include guards if they were really
> necessary, and for most headers they aren't.  In general GCC policy is to
> explicitly include every header needed by a source file.
> 
> Stan

CPP avoids caching a file if it has include guards, assuming that it's
unlikely it will be relevant again (because of the MI optimization).
So even unnecessary include guards save a bit of memory usage by the compiler.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]