This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree.h vs include guard
- From: Stan Shebs <shebs at apple dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, gcc at gcc dot gnu dot org
- Date: Tue, 13 Aug 2002 20:07:21 -0700
- Subject: Re: tree.h vs include guard
Devang Patel wrote:
We already have guard in our Darwin sources for tree.h
We have it for a reason - tree.h is included (dubiously IMHO) in one of
the PFE headers. I don't see a reason for the mainline to have it though.
I do not know, if there is particular reason for not providing guards
for headers.
At one time, I saw many headers without include protection guards.
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
On Tuesday, August 13, 2002, at 05:54 PM, Gabriel Dos Reis wrote:
Hi,
I noticed that tree.h has no guard to prevent multiple-inclusions.
Why so? FWIW, c-tree.h, c-common.h and cp-tree.h do have such a
thing.
-- Gaby
-Devang