This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++ patch to build the Java runtime withENABLE_TREE_CHECKING.
Mark Mitchell writes:
> Without even calling use_label, which I think your patch would do.
Yes.
> Try:
>
> /* We can't know where a computed goto is jumping. So we assume
> that it's OK. */
> if (TREE_CODE (decl) == IDENTIFIER_NODE)
> return;
In this case, decl is an ARRAY_REF. How about
* decl.c (check_goto): Computed gotos assumed OK.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.638
diff -u -p -r1.638 decl.c
--- decl.c 2000/06/19 18:40:21 1.638
+++ decl.c 2000/06/21 14:59:07
@@ -5024,6 +5024,11 @@ check_goto (decl)
tree bad;
struct named_label_list *lab;
+ /* We can't know where a computed goto is jumping. So we assume
+ that it's OK. */
+ if (! DECL_P (decl))
+ return;
+
/* If the label hasn't been defined yet, defer checking. */
if (! DECL_INITIAL (decl))
{
> If that passes the tests, check it in.
This one does. Still OK?
./A