This is the mail archive of the 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]

Re: standards for include guards?

On 17-May-2001, Sam TH <> wrote:
> Without getting into a discussion on the merits of include guards in
> GCC, is there some standard for naming such guards?

This was discussed on gcc-patches a month or so ago, IIRC.
Unfortunately I wasn't able to find it via the search page.

> With the help of
> grep, I have found:
>  __filename_ext
>  JV_FILENAME_EXT (in java/)
>  _H_f_filename (in f/)

Names starting with `__' or `_[A-Z]' are reserved for use by the C
implementation.  Standard library header files, and files which
are included in standard library header files, should use such names.
Other header files which are merely used in gcc (e.g. tree.h) should not.

I *think* the convention agreed on earlier was GCC_FILENAME_EXT.

Fergus Henderson <>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

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