This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patches for IRIX6 N32-ABI ld
>>>>> "Ian" == Ian Lance Taylor <ian@zembu.com> writes:
Ian> I for one would be much more comfortable with testing a
Ian> boolean expression rather than writing a test based on the
Ian> assumption that an enum value is and will remain zero. It
Ian> seems too easy for somebody to change the enum and thus
Ian> unexpectedly change the behaviour of the code. I believe the
Ian> patch as written introduces a maintenance pitfall.
Wow, I'd hoped only to get controversial at the time we started
talking about relocation processing and stuff like that. :-)
Ian> In other words, I think either SGI_COMPAT should continue to
Ian> be defined as a clearly boolean value (e.g., 1) or you should
Ian> modify all the tests of SGI_COMPAT to work in some different
Ian> manner.
I understand what you're saying. But, this is a common programming
idiom, and well understood. How about explicitly setting `sct_none'
to zero:
enum {
sct_none = 0,
...
}
together with a comment?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com