This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Standardize header guards
On Sat, May 19, 2001 at 03:11:29AM +0100, Joseph S. Myers wrote:
> On Fri, 18 May 2001, Sam TH wrote:
>
> > I used GCC_FILENAME_H everywhere, except where there was likely to be
> > a namespace conflict, for example, with files named lex.h, and then I
> > used GCC_DIR_FILENAME_H. For the fortran directory, since they had
> > all previously had _f_ in the header guards, I used GCC_F_FILENAME_EXT
> > throughout.
> >
> > There were a few I didn't change. limit[xy].h have header guards that
> > have to have the same name as various defines in the system limits.h,
> > so those can't be changed. Also, the header guard in glimits.h was
> > more complicated enough that given the problems with the other limits
> > files, I didn't change it.
>
> The changes to limitx.h, limity,h, the various float.h versions and
> ginclude/*.h are all bogus. The include guards on these headers must be
> within the ISO C reserved namespace (see subclause 7.1.3 in ISO/IEC
> 9899:1999).
>
> I suggest submitting a patch that changes only those headers that are part
> of GCC but are not installed anywhere. For installed headers you need to
> consider the ISO C namespace and possibly other interactions.
Ok, the attached patch should do just that. I've removed everything
that I had changed in limit*.h, all the config/float*.h, and all the
ginclude/*.h changes. I couldn't find anything else that had been
installed on my system, and there wasn't a good way to see in the
makefiles what was installed.
Is there a better way to find out which headers are installed?
sam th --- sam@uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dynds.org/decss
header-patch.gz
PGP signature