A few more java dir cleanups
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Sun Mar 28 11:05:00 GMT 1999
Here are a few more warning fixes and cleanups in the java
directory. The change in parse.y:patch_bc_statement() is actually a
bug-fix.
Okay to install?
Thanks,
--Kaveh
Sun Mar 28 13:30:58 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (add_method_1): Cast the argument of `bzero' to PTR.
* decl.c (copy_lang_decl): Likewise for `bcopy'.
* jcf-depend.c: Include "config.h", not <config.h>.
* jcf-parse.c (jcf_figure_file_type): Cast the arguments of
`bcopy' to PTR.
* jcf-path.c: Include "config.h", not <config.h>.
* lex.c: Don't include various system header files.
(java_init_lex): Cast the argument of `bzero' to PTR
* parse-scan.y (java_push_parser_context): Likewise.
* parse.y (java_push_parser_context): Likewise.
(patch_bc_statement): Match format specifier to variable argument.
* xref.c: Don't include <stdio.h>.
diff -rup orig/egcs-CVS19990328/gcc/java/class.c egcs-CVS19990328/gcc/java/class.c
--- orig/egcs-CVS19990328/gcc/java/class.c Sun Mar 21 08:28:27 1999
+++ egcs-CVS19990328/gcc/java/class.c Sun Mar 28 13:15:21 1999
@@ -418,7 +418,7 @@ add_method_1 (handle_class, access_flags
DECL_LANG_SPECIFIC (fndecl)
= (struct lang_decl *) permalloc (sizeof (struct lang_decl));
- bzero (DECL_LANG_SPECIFIC (fndecl), sizeof (struct lang_decl));
+ bzero ((PTR) DECL_LANG_SPECIFIC (fndecl), sizeof (struct lang_decl));
TREE_CHAIN (fndecl) = TYPE_METHODS (handle_class);
TYPE_METHODS (handle_class) = fndecl;
diff -rup orig/egcs-CVS19990328/gcc/java/decl.c egcs-CVS19990328/gcc/java/decl.c
--- orig/egcs-CVS19990328/gcc/java/decl.c Sun Mar 28 07:17:23 1999
+++ egcs-CVS19990328/gcc/java/decl.c Sun Mar 28 13:16:46 1999
@@ -1373,7 +1373,7 @@ copy_lang_decl (node)
= TREE_CODE (node) == VAR_DECL ? sizeof (struct lang_decl_var)
: sizeof (struct lang_decl);
struct lang_decl *x = (struct lang_decl *) oballoc (lang_decl_size);
- bcopy (DECL_LANG_SPECIFIC (node), x, lang_decl_size);
+ bcopy ((PTR) DECL_LANG_SPECIFIC (node), (PTR) x, lang_decl_size);
DECL_LANG_SPECIFIC (node) = x;
}
diff -rup orig/egcs-CVS19990328/gcc/java/jcf-depend.c egcs-CVS19990328/gcc/java/jcf-depend.c
--- orig/egcs-CVS19990328/gcc/java/jcf-depend.c Wed Dec 16 16:20:39 1998
+++ egcs-CVS19990328/gcc/java/jcf-depend.c Sun Mar 28 13:23:35 1999
@@ -23,7 +23,7 @@ The Free Software Foundation is independ
/* Written by Tom Tromey <tromey@cygnus.com>, October 1998. */
-#include <config.h>
+#include "config.h"
#include "system.h"
#include <assert.h>
diff -rup orig/egcs-CVS19990328/gcc/java/jcf-parse.c egcs-CVS19990328/gcc/java/jcf-parse.c
--- orig/egcs-CVS19990328/gcc/java/jcf-parse.c Sun Mar 21 08:28:44 1999
+++ egcs-CVS19990328/gcc/java/jcf-parse.c Sun Mar 28 13:18:01 1999
@@ -1002,7 +1002,7 @@ DEFUN(jcf_figure_file_type, (jcf),
&& !open_in_zip (jcf, input_filename, NULL, 0))
{
localToFile = ALLOC (sizeof (struct ZipFileCache));
- bcopy (SeenZipFiles, localToFile, sizeof (struct ZipFileCache));
+ bcopy ((PTR) SeenZipFiles, (PTR) localToFile, sizeof (struct ZipFileCache));
process_zip_dir (); /* Register all the class defined there */
return JCF_ZIP;
}
diff -rup orig/egcs-CVS19990328/gcc/java/jcf-path.c egcs-CVS19990328/gcc/java/jcf-path.c
--- orig/egcs-CVS19990328/gcc/java/jcf-path.c Fri Mar 12 19:26:07 1999
+++ egcs-CVS19990328/gcc/java/jcf-path.c Sun Mar 28 13:23:58 1999
@@ -23,7 +23,7 @@ The Free Software Foundation is independ
/* Written by Tom Tromey <tromey@cygnus.com>, October 1998. */
-#include <config.h>
+#include "config.h"
#include "system.h"
#include "jcf.h"
diff -rup orig/egcs-CVS19990328/gcc/java/lex.c egcs-CVS19990328/gcc/java/lex.c
--- orig/egcs-CVS19990328/gcc/java/lex.c Tue Mar 23 09:58:12 1999
+++ egcs-CVS19990328/gcc/java/lex.c Sun Mar 28 13:08:32 1999
@@ -34,20 +34,8 @@ The lexical analysis conforms to the Jav
Java(TM) Language Specification. J. Gosling, B. Joy, G. Steele.
Addison Wesley 1996" ( http://java.sun.com/docs/books/jls/html/3.doc.html ) */
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-
-#ifdef JAVA_LEX_DEBUG
-#include <ctype.h>
-#endif
-
#include "keyword.h"
-#ifndef SEEK_SET
-#include <unistd.h>
-#endif
-
#ifndef JC1_LITE
extern struct obstack *expression_obstack;
#endif
@@ -110,8 +98,8 @@ java_init_lex ()
ctxp->static_initialized = ctxp->non_static_initialized =
ctxp->incomplete_class = NULL_TREE;
- bzero (ctxp->modifier_ctx, 11*sizeof (ctxp->modifier_ctx[0]));
- bzero (current_jcf, sizeof (JCF));
+ bzero ((PTR) ctxp->modifier_ctx, 11*sizeof (ctxp->modifier_ctx[0]));
+ bzero ((PTR) current_jcf, sizeof (JCF));
ctxp->current_parsed_class = NULL;
ctxp->package = NULL_TREE;
#endif
diff -rup orig/egcs-CVS19990328/gcc/java/parse-scan.c egcs-CVS19990328/gcc/java/parse-scan.c
--- orig/egcs-CVS19990328/gcc/java/parse-scan.c Sun Mar 28 07:24:02 1999
+++ egcs-CVS19990328/gcc/java/parse-scan.c Sun Mar 28 13:19:54 1999
@@ -2357,7 +2357,7 @@ java_push_parser_context ()
struct parser_ctxt *new =
(struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt));
- bzero (new, sizeof (struct parser_ctxt));
+ bzero ((PTR) new, sizeof (struct parser_ctxt));
new->next = ctxp;
ctxp = new;
}
diff -rup orig/egcs-CVS19990328/gcc/java/parse-scan.y egcs-CVS19990328/gcc/java/parse-scan.y
--- orig/egcs-CVS19990328/gcc/java/parse-scan.y Sat Mar 6 11:15:26 1999
+++ egcs-CVS19990328/gcc/java/parse-scan.y Sun Mar 28 13:19:22 1999
@@ -1112,7 +1112,7 @@ java_push_parser_context ()
struct parser_ctxt *new =
(struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt));
- bzero (new, sizeof (struct parser_ctxt));
+ bzero ((PTR) new, sizeof (struct parser_ctxt));
new->next = ctxp;
ctxp = new;
}
diff -rup orig/egcs-CVS19990328/gcc/java/parse.c egcs-CVS19990328/gcc/java/parse.c
--- orig/egcs-CVS19990328/gcc/java/parse.c Sun Mar 28 07:24:00 1999
+++ egcs-CVS19990328/gcc/java/parse.c Sun Mar 28 13:13:09 1999
@@ -4892,7 +4892,7 @@ java_push_parser_context ()
struct parser_ctxt *new =
(struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt));
- bzero (new, sizeof (struct parser_ctxt));
+ bzero ((PTR) new, sizeof (struct parser_ctxt));
new->next = ctxp;
ctxp = new;
if (ctxp->next)
@@ -13272,7 +13272,7 @@ patch_bc_statement (node)
"`continue' must be in loop");
else
parse_error_context (wfl_operator,
- "continue label `%d' does not name a loop",
+ "continue label `%s' does not name a loop",
IDENTIFIER_POINTER (bc_label));
return error_mark_node;
}
diff -rup orig/egcs-CVS19990328/gcc/java/parse.y egcs-CVS19990328/gcc/java/parse.y
--- orig/egcs-CVS19990328/gcc/java/parse.y Sun Mar 28 07:17:47 1999
+++ egcs-CVS19990328/gcc/java/parse.y Sun Mar 28 13:12:32 1999
@@ -2291,7 +2291,7 @@ java_push_parser_context ()
struct parser_ctxt *new =
(struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt));
- bzero (new, sizeof (struct parser_ctxt));
+ bzero ((PTR) new, sizeof (struct parser_ctxt));
new->next = ctxp;
ctxp = new;
if (ctxp->next)
@@ -10671,7 +10671,7 @@ patch_bc_statement (node)
"`continue' must be in loop");
else
parse_error_context (wfl_operator,
- "continue label `%d' does not name a loop",
+ "continue label `%s' does not name a loop",
IDENTIFIER_POINTER (bc_label));
return error_mark_node;
}
diff -rup orig/egcs-CVS19990328/gcc/java/xref.c egcs-CVS19990328/gcc/java/xref.c
--- orig/egcs-CVS19990328/gcc/java/xref.c Sun Mar 28 07:17:48 1999
+++ egcs-CVS19990328/gcc/java/xref.c Sun Mar 28 13:24:24 1999
@@ -24,7 +24,6 @@ Java and all Java-based marks are tradem
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
-#include <stdio.h>
#include "config.h"
#include "system.h"
#include "tree.h"
More information about the Gcc-patches
mailing list