This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Java: loop variable fix.
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Java: loop variable fix.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Thu, 29 Jun 2000 19:19:38 -0700
- Reply-to: apbianco at redhat dot com
There was a loop variable error in parse.y:verify_constructor_super. I
checked in this fix.
./A
2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (verify_constructor_super): Use loop variable
`m_arg_type' initialized with `mdecl_arg_type'.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.187
diff -u -p -r1.187 parse.y
--- parse.y 2000/06/30 00:07:19 1.187
+++ parse.y 2000/06/30 02:11:59
@@ -8380,18 +8380,19 @@ verify_constructor_super (mdecl)
for (sdecl = TYPE_METHODS (class); sdecl; sdecl = TREE_CHAIN (sdecl))
if (DECL_CONSTRUCTOR_P (sdecl))
{
+ tree m_arg_type;
tree arg_type = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl)));
if (super_inner)
arg_type = TREE_CHAIN (arg_type);
- for (; (arg_type != end_params_node
- && mdecl_arg_type != end_params_node);
+ for (m_arg_type = mdecl_arg_type;
+ (arg_type != end_params_node
+ && m_arg_type != end_params_node);
arg_type = TREE_CHAIN (arg_type),
- mdecl_arg_type = TREE_CHAIN (mdecl_arg_type))
- if (TREE_VALUE (arg_type) != TREE_VALUE (mdecl_arg_type))
+ m_arg_type = TREE_CHAIN (m_arg_type))
+ if (TREE_VALUE (arg_type) != TREE_VALUE (m_arg_type))
break;
- if (arg_type == end_params_node &&
- mdecl_arg_type == end_params_node)
+ if (arg_type == end_params_node && m_arg_type == end_params_node)
return 0;
}
}