This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: FYI: gcj ICE fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 01 Mar 2003 14:37:19 -0700
- Subject: Patch: FYI: gcj ICE fixlet
- Reply-to: tromey at redhat dot com
I'm checking this in as obvious on the trunk.
My earlier deprecation fix introduced an ICE. If the user's code has
a bug, in one situation we can have `decl == NULL_TREE'; this causes
the deprecation check to crash. Other code in this same function
checks decl as well, hence this patch.
Tom
Index: ChangeLog
from Tom Tromey <tromey at redhat dot com>
* parse.y (jdep_resolve_class): Only check deprecation if we found
a decl.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.423
diff -u -r1.423 parse.y
--- parse.y 28 Feb 2003 20:53:47 -0000 1.423
+++ parse.y 1 Mar 2003 21:36:52 -0000
@@ -5464,7 +5464,7 @@
JDEP_RESOLVED (dep, decl);
/* If there is no WFL, that's ok. We generate this warning
elsewhere. */
- if (JDEP_WFL (dep) != NULL_TREE)
+ if (decl && JDEP_WFL (dep) != NULL_TREE)
check_deprecation (JDEP_WFL (dep), decl);
}