public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@zembu.com>
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	[thread overview]
Message-ID: <19990626192703.9669.qmail@daffy.airs.com> (raw)
In-Reply-To: <19990626120519O.mitchell@codesourcery.com>

   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

  reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Mark Mitchell
1999-07-01  0:00 ` Richard Henderson
1999-07-01  0:00   ` Mark Mitchell
1999-07-01  0:00     ` Ian Lance Taylor [this message]
1999-07-01  0:00       ` Mark Mitchell
1999-07-01  0:00         ` Ian Lance Taylor
1999-07-01  0:00           ` Mark Mitchell
1999-07-01  0:00             ` Ian Lance Taylor
1999-07-01  0:00               ` Mark Mitchell
1999-07-01  0:00             ` Richard Henderson
1999-07-01  0:00               ` Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990626192703.9669.qmail@daffy.airs.com \
    --to=ian@zembu.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=mark@codesourcery.com \
    --cc=rth@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).