This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: gcj PR 310
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Subject: Patch: gcj PR 310
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 20 Aug 2000 10:26:59 -0600
- Reply-To: tromey at cygnus dot com
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,