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


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




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