Standardize header guards

Sam TH sam@uchicago.edu
Fri May 18 20:24:00 GMT 2001


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

-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7Betat+kM0Mq9M/wRAih5AKClqtzoq5PbwkdYUhFah8HKXNqhgwCggMvd
1GaxS+sWBwKYAMmVgKBO7bM=
=qcMx
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: header-patch.gz
Type: application/x-gzip
Size: 13674 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20010518/3ab4fcc5/attachment.bin>


More information about the Gcc-patches mailing list