This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: Patch to remove fixes that just wrap with #ifndef


On Sat, 13 Nov 2004, Bruce Korb wrote:

> "Joseph S. Myers" wrote:
> > 
> > Fixincludes fixes that just add #ifndef about some definition that may
> > be in more than one header are unnecessary since duplicate macro
> > definitions, even with different values, are allowed in system headers
> > and if some definition is actually wrong there's just as much case for
> > fixing it with or without the #ifndef.  This patch removes such fixes
> > which just add #ifndef.
> 
> Does the same logic apply to the 3.x sources?
> (The fewer fixes the better ....:) - Bruce

The same logic applies at least from 3.0 onwards - 3.0 doesn't object to 
duplicate macro definitions with different values in system headers.  I'm 
only proposing this patch for mainline; unnecessary fixes are reasonably a 
bug, but not really a regression (and if somewhere the macros do have 
different values in different headers, changing which definition gets used 
is a gratuitous change for users of a release branch); all these fixes 
were present in some form or another in 2.95.x.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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