standards for include guards?
Fergus Henderson
fjh@cs.mu.oz.au
Thu May 17 08:45:00 GMT 2001
On 17-May-2001, Sam TH <sam@uchicago.edu> 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
> GCC_FILENAME_EXT
> __GCC_FILENAME_EXT__
> _GCC_FILENAME_EXT
> __FILENAME_EXT__
> __filename_ext
> FILENAME_EXT_INCLUDED
> FILENAME_EXT
> _FILENAME_EXT_
> JV_FILENAME_EXT (in java/)
> _DIR_FILENAME_EXT
> _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 <fjh@cs.mu.oz.au> | "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.
More information about the Gcc
mailing list