This is the mail archive of the binutils@sourceware.org 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: Binutils patch to add support for Open8 MCU


On Wed, 30 Mar 2011, Hans-Peter Nilsson wrote:

> Random spotting of "#if 0" code (remove that) and the "lappend

Spotting that made me look for #if in this code, and so notice another 
thing:

+// ASSUMES LITTLE_ENDIAN HOST
+#if __BYTE_ORDER != __LITTLE_ENDIAN
+#error ("Open8/ARClite/V8 binutils assumes a little-endian host!")
+#endif

No, code in GNU binutils is expected to be portable to both endiannesses 
of host, so fix this problem before resubmitting (if you need a big-endian 
host to test on, you should be able to get an account on the GCC compile 
farm) - you really shouldn't need to look at the details of 
representations of host types at all, so the code simply shouldn't care 
about host endianness.  And you can't use C++ // comments in C code.  And 
the __BYTE_ORDER and __LITTLE_ENDIAN macros aren't portable either; nor is 
the <endian.h> header, so don't include that.

-- 
Joseph S. Myers
joseph@codesourcery.com


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