* parse.y (init_src_parse): Added sanity check.
* parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
elements, not 11.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51398
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-03-26 Tom Tromey <tromey@redhat.com>
+
+ Fix for PR java/5942:
+ * parse.y (init_src_parse): Added sanity check.
+ * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
+ elements, not 11.
+
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (lang_mark_tree): Rename java_mark_tree.
/* This section is defined only if we compile jc1 */
#ifndef JC1_LITE
- tree modifier_ctx [11]; /* WFL of modifiers */
+ tree modifier_ctx [12]; /* WFL of modifiers */
tree class_type; /* Current class */
tree function_decl; /* Current function decl, save/restore */
{
/* Register roots with the garbage collector. */
ggc_add_tree_root (src_parse_roots, ARRAY_SIZE (src_parse_roots));
+
+ /* Sanity check; we've been bit by this before. */
+ if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK)
+ abort ();
}
\f