This is the mail archive of the gcc@gcc.gnu.org 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]

Re: Chill warning questions #1 & #2


Sorry, I was a little slow in responding, but it looks like you got the answers
you needed.

Dave




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.





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.




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