This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bogus signed/unsigned warning

On Fri, 6 Sep 2002, Jeff Law wrote:

>  >ChangeLog:
>  >2002-08-26  Ansgar Esztermann  <>
>  >
>  >        * 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.

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            | 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]