Commit 2e0f0aff by Tom Tromey Committed by Tom Tromey

re GNATS gcj/310 (illegal type "long" accepted for "switch" expression)

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

From-SVN: r35819
parent 4e1e6a01
2000-08-09 Tom Tromey <tromey@cygnus.com>
* parse.y (patch_switch_statement): Disallow `long' in switch
expressions. Fixes PR gcj/310.
2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (finit_leg_identifier_node): New global.
......
......@@ -14413,7 +14413,7 @@ patch_switch_statement (node)
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment