This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patches for IRIX6 N32-ABI ld
From: Mark Mitchell <mark@codesourcery.com>
Date: Sat, 26 Jun 1999 12:05:19 -0700
>>>>> "Richard" == Richard Henderson <rth@cygnus.com> 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