This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/21540] switch stmt problem


------- 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


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