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: Standardize header guards

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

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.

Joseph S. Myers

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