aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-08-25 13:59:28 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-08-25 13:59:28 +0000
commitbe245ac0a0e683280ace5512fff65d06ef6087bf (patch)
treef6fd109497decb5c5599a47168e73511e912c666 /gcc/java/lang.c
parentffee6d93875b9e1cb9c35440dfd0e19d48fe3b8d (diff)
downloadgcc-be245ac0a0e683280ace5512fff65d06ef6087bf.zip
gcc-be245ac0a0e683280ace5512fff65d06ef6087bf.tar.gz
gcc-be245ac0a0e683280ace5512fff65d06ef6087bf.tar.bz2
gjavah.c (print_name, [...]): Add static prototype.
* gjavah.c (print_name, print_base_classname, utf8_cmp, cxx_keyword_subst, generate_access, name_is_method_p, get_field_name, print_field_name, super_class_name, print_include, decode_signature_piece, print_class_decls, usage, help, java_no_argument, version, add_namelet, print_namelet): Add static prototype. (print_base_classname, utf8_cmp, cxx_keyword_subst, name_is_method_p): Constify a char*. (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy. Provide a final else clause in an if-else-if. (print_field_info): Add missing final arg in function call to `print_field_name'. (print_method_info, decompile_method, decode_signature_piece, print_c_decl, print_full_cxx_name, print_stub, print_mangled_classname, super_class_name, print_include, add_namelet, add_class_decl, print_class_decls, process_file, help): Constify a char*. * jcf-write.c (jcf_handler, push_constant1, push_constant2, push_int_const, find_constant_wide, find_constant_index, push_long_const, field_op, maybe_wide, emit_dup, emit_pop, emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop, emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc, emit_if, emit_goto, emit_jsr, call_cleanups, make_class_file_name): Add static prototypes. (generate_bytecode_return, generate_bytecode_insns): Pass a NULL_PTR, not a NULL_TREE. * jv-scan.c: Include "jcf.h". (main): Declare using DEFUN macro. * jvspec.c (find_spec_file, lang_specific_pre_link, lang_specific_driver): Add prototypes. (find_spec_file): Constify a char*. * keyword.gperf (hash, java_keyword): Add prototypes. * lang.c (lang_print_error): Add static prototype. (lang_init): Prefer memcpy over bcopy to avoid casts. * lex.c (yylex): Add static prototype. * parse-scan.y: Include "lex.c" earlier. * parse.h: Remove redundant declaration for `yylex'. * parse.y (java_decl_equiv, binop_compound_p, search_loop, labeled_block_contains_loop_p): Add static prototypes. (not_accessible_p): Make static to match prototype. * verify.c (start_pc_cmp): Don't needlessly cast away const. From-SVN: r28862
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 3287575..c04410c 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -39,6 +39,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
static void put_decl_string PROTO ((const char *, int));
static void put_decl_node PROTO ((tree));
static void java_dummy_print PROTO ((const char *));
+static void lang_print_error PROTO ((const char *));
#ifndef OBJECT_SUFFIX
# define OBJECT_SUFFIX ".o"
@@ -453,7 +454,7 @@ lang_printable_name (decl, v)
/* Print on stderr the current class and method context. This function
is the value of the hook print_error_function, called from toplev.c. */
-void
+static void
lang_print_error (file)
const char *file;
{
@@ -507,17 +508,17 @@ lang_init ()
/* Append to Gcc tree node definition arrays */
- bcopy (java_tree_code_type,
- tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
- (int)LAST_JAVA_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
- bcopy ((char *)java_tree_code_length,
- (char *)(tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE),
- (LAST_JAVA_TREE_CODE -
- (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
- bcopy ((char *)java_tree_code_name,
- (char *)(tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
- (LAST_JAVA_TREE_CODE -
- (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
+ memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
+ java_tree_code_type,
+ (int)LAST_JAVA_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
+ memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
+ java_tree_code_length,
+ (LAST_JAVA_TREE_CODE -
+ (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
+ memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
+ java_tree_code_name,
+ (LAST_JAVA_TREE_CODE -
+ (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
using_eh_for_cleanups ();
}