This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] remove redundant tests
- From: Nathanael Nerode <neroden at doctormoo dot dyndns dot org>
- To: Matt Kraai <kraai at alumni dot cmu dot edu>
- Cc: gcc at gcc dot gnu dot org, dj at redhat dot com
- Date: Sat, 22 Jun 2002 13:45:34 -0400
- Subject: Re: [patch] remove redundant tests
- References: <20020622145347.GA19113@doctormoo.dyndns.org> <20020622162020.GA257@catalonia>
On Sat, Jun 22, 2002 at 09:20:20AM -0700, Matt Kraai wrote:
> On Sat, Jun 22, 2002 at 10:53:47AM -0400, Nathanael Nerode wrote:
> > This removes some (now) redundant tests from toplevel configure.in.
> >
> > 2002-06-22 Nathanael Nerode <neroden@twcny.rr.com>
> > * configure.in: Remove some redundant tests.
> >
> > Index: configure.in
> > ===================================================================
> > RCS file: /cvsroot/gcc/gcc/configure.in,v
> > retrieving revision 1.162
> > diff -u -r1.162 configure.in
> > +++ configure.in 22 Jun 2002 14:52:31 -0000
> [snip]
> > @@ -1517,8 +1515,7 @@
> > fi
> >
> > if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Isn't this test also redundant?
Yes, it is. However, I couldn't decide whether the tests in this if
statement were actually correct. *cough*.
If you specify --without-gnu-ld, this clause isn't executed. Correct.
If you specify nothing on an ordinary configuration, and ld is being
configured, then this clause is executed. Correct.
If you specify nothing on an ordinary configuration, and ld is not being
configured, then this clause is not executed. Correct.
If you specify nothing on a use_gnu_ld=no configuration, this clause is
not executed. Correct.
If you specify --with-gnu-ld on an ordinary configuration, and ld is
being configured, this clause is executed. Correct.
If you specify --with-gnu-ld on an ordinary configuration, and ld is
not being configured, this clause isn't executed. Correct or not?
If you specify --with-gnu-ld on a use_gnu_ld=no configuration, this
clause isn't executed. I'm guessing incorrect.
That's why I didn't clean up all the tests here; it's a reminder that I
want to actually get the test right.
So, thoughts on what the right behavior is? *grin*
--Nathanael