This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Chill warning questions #2
- To: ghazi at caip dot rutgers dot edu (Kaveh R. Ghazi)
- Subject: Re: Chill warning questions #2
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Mon, 12 Oct 98 10:17:29 PDT
- Cc: brolley at cygnus dot com, egcs at cygnus dot com
> 1. Where should the parens go?
>
> expr.c: In function `build_chill_card':
> expr.c:1376: warning: suggest parentheses around comparison in operand of &
>
> > if (TREE_CODE (powerset) == CONSTRUCTOR & TREE_CONSTANT (powerset)
> > && (size = int_size_in_bytes (TREE_TYPE (powerset))) >= 0)
I think that the & should be an &&.
> 3. Who here needs a cast, and to what?
>
> expr.c: In function `chill_expand_expr':
> expr.c:232: warning: comparison between signed and unsigned
>
> > if (mode != Pmode && modifier == EXPAND_SUM)
Why is this warning being issued for != and == comparisons? The
reason for this warning is that relational comparisons (<, <=, >, >=)
have unexpected results when comparing negative signed values to
unsigned values. Since there is no unexpected behavior for != or
==, I don't believe that the compiler should warn in this case.