Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* enum { BFD_ENDIAN_BIG, ...}
@ 2001-12-16 17:23 Andrew Cagney
  2001-12-16 21:49 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2001-12-16 17:23 UTC (permalink / raw)
  To: binutils; +Cc: gdb

Hello,

I'm curious.  Why/how did BFD_ENDIAN_BIG come to be first in the enum:

enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };

This has the (intended?) effect of memset(0) setting a value to 
BFD_ENDIAN_BIG where as code using the common host dependant BIG_ENDIAN 
/ LITTLE_ENDIAN would have treated such a value as undefined.

GDB, which is trying to eliminate its dependance on those host dependant 
macros is suffering minor heart burn as a result of the difference - it 
has been assuming that ZERO indicated an uninitialized (roughly 
BFD_ENDIAN_UNKNOWN) value.

	Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-12-18  1:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-16 17:23 enum { BFD_ENDIAN_BIG, ...} Andrew Cagney
2001-12-16 21:49 ` Ian Lance Taylor
2001-12-17  7:30   ` Andrew Cagney
2001-12-17 16:29     ` Alan Modra
2001-12-17 16:46       ` Richard Henderson
2001-12-17 17:44         ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox