enum { BFD_ENDIAN_BIG, ...}
Alan Modra
amodra@bigpond.net.au
Mon Dec 17 17:57:00 GMT 2001
More information about the Binutils mailing list
Mon Dec 17 17:57:00 GMT 2001
- Previous message (by thread): enum { BFD_ENDIAN_BIG, ...}
- Next message (by thread): patch, xcoff.h formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Dec 17, 2001 at 04:45:21PM -0800, Richard Henderson wrote: > On Tue, Dec 18, 2001 at 10:59:41AM +1030, Alan Modra wrote: > > While we're on this subject, note that initialising pointers (and FP) to > > all-bits-zero via memset is not strictly portable. Not all architectures > > represent a NULL pointer as all-bits-zero. The C-FAQ mentions a number > > of such machines. http://www.eskimo.com/~scs/C-faq/top.html > > Whatever. None of them are live. Heh. I suppose I should have admitted noticing this strict portabilty problem at various times, and couldn't be bothered fixing occurrences. The thing is, a number of places in binutils do memset (structp, 0, sizeof (*structp); structp->ptr1 = NULL; structp->ptr2 = NULL; . . as if at some stage binutils authors were concerned about this portability issue. Typically, not _all_ pointers in the struct are set to NULL, likely due to bitrot. That's mildly confusing, and should probably be fixed. My inclination is to remove such "unnecessary" initialisation. Alan
- Previous message (by thread): enum { BFD_ENDIAN_BIG, ...}
- Next message (by thread): patch, xcoff.h formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list