This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: excessive stab information


> In your program, always include stddef.h before sys/types.h.

That's some global edit! We've got loads of programs all exhibiting this
"issue". In total, there's over 15000 files that we use in various
guises in these programs (think lots of small libraries that are linked
together). Some of this is third party software that we have no control
over: we could edit it but then we'd have a maintenance nightmare when
we took a new upstream release. Oh well ...

-- 
Andy, BlueArc Engineering
 

> -----Original Message-----
> From: Ian Lance Taylor [mailto:ian@airs.com] 
> Sent: 20 April 2005 15:59
> To: Andy Chittenden
> Cc: binutils@sourceware.org; Martin Dorey
> Subject: Re: excessive stab information
> 
> "Andy Chittenden" <AChittenden@bluearc.com> writes:
> 
> > So I've started to rationalise some header files so that 
> there are no
> > conditionally compiled chunks of header files as this 
> should make the
> > optimisation of stabs work properly. However, one of the culprits is
> > sys/types.h that is supposed to define size_t
> > 
> <http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/ty
> pes.h.html
> > >. However, size_t is defined by the gcc supplied header 
> file stddef.h.
> > One way to deal with this is to #define __need_size_t and #include
> > <stddef.h> and get the conditional compilation wizardry in 
> that file to
> > deal with it. However, that in its own right is going to cause
> > "duplicate" stabs if another compilation unit #includes 
> stddef.h in its
> > entirety. If another header file references size_t, then 
> depending on
> > how size_t got defined in a particular compilation unit, 
> then a whole
> > header file's worth of definition is going to be "duplicated".
> > 
> > Has anyone got any suggestions as to how to prevent this?
> 
> In your program, always include stddef.h before sys/types.h.
> 
> Ian
> 


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