From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: mark@codesourcery.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: <19990626192703.9669.qmail@daffy.airs.com> References: <19990626110155A.mitchell@codesourcery.com> <19990626112510.A21222@cygnus.com> <19990626120519O.mitchell@codesourcery.com> <19990626120519O.mitchell@codesourcery.com> X-SW-Source: 1999-q2/msg00357.html From: Mark Mitchell Date: Sat, 26 Jun 1999 12:05:19 -0700 >>>>> "Richard" == Richard Henderson writes: Richard> On Sat, Jun 26, 1999 at 11:01:55AM -0700, Mark Mitchell Richard> wrote: >> - if (SGI_COMPAT (abfd) + if (SGI_COMPAT (output_bfd) Richard> This isn't correct anymore, now that this is an Richard> enumeration. Otherwise it's fine. Why not? It's still zero (i.e., sct_none) if we're not trying for compatibility and non-zero (i.e., sct_irix5 or sct_irix6) otherwise? The point of that change is that there is no `abfd' in that function. The BFD is `output_bfd'; before `abfd' was accepted only because SGI_COMPAT didn't look at its argument. What am I missing? I for one would be much more comfortable with testing a boolean expression rather than writing a test based on the assumption that an enum value is and will remain zero. It seems too easy for somebody to change the enum and thus unexpectedly change the behaviour of the code. I believe the patch as written introduces a maintenance pitfall. In other words, I think either SGI_COMPAT should continue to be defined as a clearly boolean value (e.g., 1) or you should modify all the tests of SGI_COMPAT to work in some different manner. Ian