[Bug java/21540] switch stmt problem
tromey at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jun 21 18:36:00 GMT 2005
------- Additional Comments From tromey at gcc dot gnu dot org 2005-06-21 18:36 -------
The bug here is that the semantic analysis for a case expression,
in parse.y:java_complete_lhs(), just does this:
/* First, the case expression must be constant. Values of final
fields are accepted. */
cn = fold (cn);
However, fold() does not know about final fields and the like.
fold_constant_for_init doesn't seem to be factored properly to be
useful here, either.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21540
More information about the Java-prs
mailing list