This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Recent java warnings reveal bugs (?)
- To: apbianco at cygnus dot com
- Subject: Recent java warnings reveal bugs (?)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 9 May 2000 13:32:07 -0400 (EDT)
- Cc: egcs-bugs at egcs dot cygnus dot com
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