From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Mitchell To: ian@zembu.com Cc: rth@cygnus.com, binutils@sourceware.cygnus.com Subject: Re: Patches for IRIX6 N32-ABI ld Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <19990626134622L.mitchell@codesourcery.com> References: <19990626112510.A21222@cygnus.com> <19990626120519O.mitchell@codesourcery.com> <19990626192703.9669.qmail@daffy.airs.com> <19990626192703.9669.qmail@daffy.airs.com> X-SW-Source: 1999-q2/msg00358.html >>>>> "Ian" == Ian Lance Taylor 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