This is the mail archive of the
mailing list for the GCC project.
Re: standards for include guards?
- To: Sam TH <sam at uchicago dot edu>, gcc at gcc dot gnu dot org
- Subject: Re: standards for include guards?
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Date: Fri, 18 May 2001 01:45:27 +1000
- References: <20010517095918.A18396@uchicago.edu>
On 17-May-2001, Sam TH <firstname.lastname@example.org> 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:
> 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 <email@example.com> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.