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

Patch: gcj PR 310


I'm checking this in with Alex's approval.

2000-08-09  Tom Tromey  <tromey@cygnus.com>

	* parse.y (patch_switch_statement): Disallow `long' in switch
	expressions.  Fixes PR gcj/310.

Tom

Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.200
diff -u -r1.200 parse.y
--- parse.y	2000/08/11 22:01:37	1.200
+++ parse.y	2000/08/20 16:17:57
@@ -14413,7 +14429,7 @@
   se_type = TREE_TYPE (se);
   /* The type of the switch expression must be char, byte, short or
      int */
-  if (!JINTEGRAL_TYPE_P (se_type))
+  if (! JINTEGRAL_TYPE_P (se_type) || se_type == long_type_node)
     {
       EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node);
       parse_error_context (wfl_operator,

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