This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: bogus signed/unsigned warning
- From: Ansgar Esztermann <ansgar at thphy dot uni-duesseldorf dot de>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Sep 2002 13:17:48 +0200 (CEST)
- Subject: Re: bogus signed/unsigned warning
On Fri, 6 Sep 2002, Jeff Law wrote:
> >ChangeLog:
> >2002-08-26 Ansgar Esztermann <ansgar@thphy.uni-duesseldorf.de>
> >
> > * fold-const.c (tree_expr_nonnegative_p): Handle statement
> > expressions.
> >
> > * gcc.dg/compare2.c Removed xfail from cases 10 and 12.
> The problem I see with this patch is that it "pollutes" fold-const
> with c-common.
>
> fold-const should be totally language independent.
Yes, you're right. I have submitted another version of the patch that
avoids this problem.
> One way to deal with this would be to have languages register a
> routine to call when tree_expr_nonnegative_p encounters a node it
> does not understand.
I have taken the opposite approach: there now exists a C specific
version, c_tree_expr_nonnegative_p(), which handles statement
expressions and otherwise defers to the language independent version.
Ansgar
--
Institut fuer theoretische Physik II | Geb. 25.32.02
Heinrich-Heine-Universitaet Duesseldorf | +49-211-8112059 (phone)
Universitaetsstr. 1 | +49-211-8112262 (fax)
D-40225 Duesseldorf, Germany |