This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Java: Follow up fix for check-init.c and a new xref support routine.
- To: egcs-patches at egcs dot cygnus dot com
- Subject: [PATCH] Java: Follow up fix for check-init.c and a new xref support routine.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Fri, 14 May 1999 13:47:18 -0700
I checked in a patch that I missed in my yesterday set of patches
aiming at eliminating bogus warnings produced by jc1. (See
http://egcs.cygnus.com/ml/egcs-patches/1999-05/msg00292.html). Without
this patch, jc1 would for example crash recompiling the libgcj
java/io/StreamTokenizer.java file.
This patch also provides a new support routine for the xref
"back-end." and eliminates an unnecessary block of code in java/lang.c.
./A
Fri May 14 12:31:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* xref.c (xref_set_current_fp): New function, defined.
* xref.h (xref_set_current_fp): New function, prototyped.
Fri May 14 11:57:54 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Take into account that
LABELED_BLOCK_STMT can be empty.
Index: check-init.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/check-init.c,v
retrieving revision 1.10
diff -u -p -r1.10 check-init.c
--- check-init.c 1999/05/13 14:33:27 1.10
+++ check-init.c 1999/05/14 20:42:08
@@ -475,7 +475,8 @@ check_init (exp, before)
struct alternatives alt;
BEGIN_ALTERNATIVES (before, alt);
alt.block = exp;
- check_init (LABELED_BLOCK_BODY (exp), before);
+ if (LABELED_BLOCK_BODY (exp))
+ check_init (LABELED_BLOCK_BODY (exp), before);
done_alternative (before, &alt);
END_ALTERNATIVES (before, alt);
return;
Index: lang.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/lang.c,v
retrieving revision 1.23
diff -u -p -r1.23 lang.c
--- lang.c 1999/05/06 21:20:00 1.23
+++ lang.c 1999/05/14 20:42:08
@@ -173,16 +173,6 @@ lang_decode_option (argc, argv)
}
#undef ARG
-#define XARG "-fxref="
- if (strncmp (p, XARG, sizeof (XARG) - 1) == 0)
- {
- if (!(flag_emit_xref = xref_flag_value (p + sizeof (XARG) - 1)))
- error ("Unkown xref format `%s'", p + sizeof (XARG) - 1);
- else
- return 1;
- }
-#undef XARG
-
if (p[0] == '-' && p[1] == 'f')
{
/* Some kind of -f option.
Index: xref.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/xref.c,v
retrieving revision 1.5
diff -u -p -r1.5 xref.c
--- xref.c 1999/05/13 14:33:35 1.5
+++ xref.c 1999/05/14 20:42:08
@@ -66,6 +66,13 @@ xref_get_data (flag)
return xref_table [flag-1].data;
}
+void
+xref_set_current_fp (fp)
+ FILE *fp;
+{
+ xref_table [flag_emit_xref-1].fp = fp;
+}
+
/* Branch to the right xref "back-end". */
void
Index: xref.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/xref.h,v
retrieving revision 1.5
diff -u -p -r1.5 xref.h
--- xref.h 1999/05/13 14:33:37 1.5
+++ xref.h 1999/05/14 20:42:08
@@ -28,6 +28,7 @@ int xref_flag_value PROTO ((char *));
void expand_xref PROTO ((tree));
void xref_set_data PROTO ((int, void *));
void *xref_get_data PROTO ((int));
+void xref_set_current_fp PROTO ((FILE *));
/* flag_emit_xref range of possible values. */