Recent java warnings reveal bugs (?)
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue May 9 10:32:00 GMT 2000
I'm getting two warnings from the java dir in last night's CVS which
might reveal bugs:
> ./parse.y:10000: warning: `rlist' might be used uninitialized in this
> function
> ../../../egcs-CVS20000508/gcc/java/jcf-write.c:849: warning:
> comparison between signed and unsigned
Here's the code in question:
parse.y:
> tree rlist;
> if (t != object_type_node)
> rlist = find_applicable_accessible_methods_list (lc, t,
> name, arglist);
> list = chainon (rlist, list);
In the above case, rlist is definitely uninitialized when the if
statement's clause isn't taken. Perhaps the last statement setting
`list' should be in the if-clause within braces?
jcf-write.c:
> || (hi == -1 && (jword)(lo & 0xFFFFFFFF) >= -32768))
Here it looks like jword (an unsigned value) is being compared against
a negative value. If it is intentional then the negative value
probably should be cast to a jword.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc-bugs
mailing list