From: Jeffrey A Law <law@cygnus.com>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: egcs@cygnus.com
Subject: Re: egcs-980214, possible bug in loop.c, revealed by -W -Wall
Date: Wed, 18 Feb 1998 02:42:00 -0000 [thread overview]
Message-ID: <23279.887779903@hurl.cygnus.com> (raw)
In-Reply-To: <199802172038.PAA04370@caip.rutgers.edu>
In message < 199802172038.PAA04370@caip.rutgers.edu >you write:
> I got one of those ambiguous `else' warnings from loop.c:
>
> > loop.c: In function `rtx_equal_for_loop_p':
> > loop.c:1485: warning: suggest explicit braces to avoid ambiguous `else'
>
> The code in question looks like this:
>
> > /* If we have a register and a constant, they may sometimes be
> > equal. */
> > if (GET_CODE (x) == REG && n_times_set[REGNO (x)] == -2
> > && CONSTANT_P (y))
> > for (m = movables; m; m = m->next)
> > if (m->move_insn && m->regno == REGNO (x)
> > && rtx_equal_p (m->set_src, y))
> > return 1;
> >
> > else if (GET_CODE (y) == REG && n_times_set[REGNO (y)] == -2
> > && CONSTANT_P (x))
> > for (m = movables; m; m = m->next)
> > if (m->move_insn && m->regno == REGNO (y)
> > && rtx_equal_p (m->set_src, x))
> > return 1;
>
>
> It looks to me like either the indentation of the else-if is
> wrong, or the code is in serious need of disambiguating braces.
>
> Would someone who knows the code please verify?
I believe the code is wrong -- the indention is what the author
wanted. So, we need some braces around those inner if (...) return 1
statements.
I've checked in a fix for this.
jeff
prev parent reply other threads:[~1998-02-18 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-02-17 14:10 Kaveh R. Ghazi
1998-02-18 2:42 ` Jeffrey A Law [this message]
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=23279.887779903@hurl.cygnus.com \
--to=law@cygnus.com \
--cc=egcs@cygnus.com \
--cc=ghazi@caip.rutgers.edu \
/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).