This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree.h vs include guard
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Stan Shebs <shebs at apple dot com>
- Cc: Devang Patel <dpatel at apple dot com>,Gabriel Dos Reis <gdr at integrable-solutions dot net>, gcc at gcc dot gnu dot org
- Date: Wed, 14 Aug 2002 07:29:30 +0100
- Subject: Re: tree.h vs include guard
- References: <3D59C969.5070403@apple.com>
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.