This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Chill warning questions #1 & #2
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Chill warning questions #1 & #2
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Thu, 15 Oct 1998 11:49:48 -0400
- CC: egcs at cygnus dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <199810100123.VAA09141@caip.rutgers.edu>
Sorry, I was a little slow in responding, but it looks like you got the answers
you needed.
Dave
- To: brolley at cygnus dot com
- Subject: Chill warning questions #1
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 9 Oct 1998 21:23:41 -0400 (EDT)
- Cc: egcs at cygnus dot com
Hi Dave,
Here are some more questions I have about warnings in the ch dir:
There are three "unused variable" warnings which during declaration
are set to function calls. I didn't simply remove them in case the
function calls had necessary side effects. We can:
A. Remove them. (Function calls aren't needed.)
B. Call the functions after all variable declarations.
C. If the functions must be called exactly as listed, we can mark the
variables with ATTRIBUTE_UNUSED.
parse.c: In function `parse_spec_module':
parse.c:547: warning: unused variable `module_name'
parse.c: In function `parse_operand6':
parse.c:3147: warning: unused variable `location'
inout.c: In function `init_text_location':
inout.c:2224: warning: unused variable `textlength'
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Icon CMT Corp.
- To: brolley at cygnus dot com
- Subject: Chill warning questions #2
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 9 Oct 1998 21:41:42 -0400 (EDT)
- Cc: egcs at cygnus dot com
Dave,
Here are more questions I have about warnings in the ch dir.
Would you please take a look?
Thanks,
--Kaveh
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)
2. In the following case, did you mean to use "=", not "=="?
Or should the line be removed?
typeck.c: In function `build_chill_cast':
typeck.c:1214: warning: statement with no effect
> TREE_READONLY (expr) == TYPE_READONLY (type);
> return expr;
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)
4. What should have been printed here?
tasking.c: In function `build_signal_descriptor':
tasking.c:1275: warning: char format, tree_node arg (arg 2)
> tree signame = DECL_NAME (sigdef);
> [...]
> error ("SEND requires a SIGNAL; %s is not a SIGNAL name", signame);
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Icon CMT Corp.