diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 54 | ||||
-rw-r--r-- | gcc/c-lang.c | 2 | ||||
-rw-r--r-- | gcc/calls.c | 2 | ||||
-rw-r--r-- | gcc/collect2.c | 2 | ||||
-rw-r--r-- | gcc/combine.c | 2 | ||||
-rw-r--r-- | gcc/cpplib.c | 7 | ||||
-rw-r--r-- | gcc/dbxout.c | 9 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 4 | ||||
-rw-r--r-- | gcc/expr.c | 6 | ||||
-rw-r--r-- | gcc/fix-header.c | 12 | ||||
-rw-r--r-- | gcc/flow.c | 6 | ||||
-rw-r--r-- | gcc/function.c | 5 | ||||
-rw-r--r-- | gcc/gen-protos.c | 3 | ||||
-rw-r--r-- | gcc/haifa-sched.c | 2 | ||||
-rw-r--r-- | gcc/libgcc2.c | 6 | ||||
-rw-r--r-- | gcc/protoize.c | 2 | ||||
-rw-r--r-- | gcc/scan-decls.c | 3 |
17 files changed, 96 insertions, 31 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 633f6b69097..8b70fb71be3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,57 @@ +Wed Mar 18 09:56:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * c-lang.c (finish_file): Wrap variable `void_list_node' with macro + test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR. + + * calls.c (emit_call_1): Wrap variable `already_popped' with macro + test !ACCUMULATE_OUTGOING_ARGS. + + * collect2.c (write_c_file_glob): Wrap function definition in + macro test !LD_INIT_SWITCH. + + * combine.c (try_combine): Wrap variables `cc_use' and + `compare_mode' in macro test EXTRA_CC_MODES. + + * cpplib.c (do_ident): Remove unused variable `len'. + (skip_if_group): Remove unused variables `at_beg_of_line' and + `after_ident'. + (cpp_get_token): Remove unused variable `dummy'. + + * dbxout.c (scope_labelno): Move static variable definition inside + the one function scope where it is used. + (dbxout_function_end): Wrap prototype and definition in + macro test !NO_DBX_FUNCTION_END. + + * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number' + in macro test !MIPS_DEBUGGING_INFO. + + * expr.c (expand_builtin_setjmp): Move declaration of variable `i' + into the scope where it is used. Wrap empty else-statement body + in braces. + + * fix-header.c: Fix typo in comment. + (inf_skip_spaces): Cast results of INF_UNGET to (void). + (check_protection, main): Likewise. + + * flow.c (find_basic_blocks_1): Remove dangling comment text. + + * function.c (contains): Wrap prototype and definition in macro + test HAVE_prologue || HAVE_epilogue. + (fixup_var_refs_1): Remove unused variable `width'. + + * gen-protos.c (main): Remove unused variable `optr'. + + * haifa-sched.c (debug_control_flow): Remove unused variable `j'. + + * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0. + (__sjpopnthrow): Remove unused variable `jmpbuf'. + (__throw): Remove unused variable `val'. + + * protoize.c: Check for a previously existing definition before + defining *_OK macros. + + * scan-decls.c (scan_decls): Remove unused variable `old_written'. + Tue Mar 17 00:45:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk> * vax.h (ADDR_VEC_ALIGN): Define. diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 10cd7636082..19d742ab134 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -143,7 +143,9 @@ finish_file () extern tree static_dtors; #endif extern tree build_function_call PROTO((tree, tree)); +#if !defined(ASM_OUTPUT_CONSTRUCTOR) || !defined(ASM_OUTPUT_DESTRUCTOR) tree void_list_node = build_tree_list (NULL_TREE, void_type_node); +#endif #ifndef ASM_OUTPUT_CONSTRUCTOR if (static_ctors) { diff --git a/gcc/calls.c b/gcc/calls.c index 962882d383e..86dc28bcba6 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -358,7 +358,9 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, struct_value_size, rtx stack_size_rtx = GEN_INT (stack_size); rtx struct_value_size_rtx = GEN_INT (struct_value_size); rtx call_insn; +#ifndef ACCUMULATE_OUTGOING_ARGS int already_popped = 0; +#endif /* Ensure address is valid. SYMBOL_REF is already valid, so no need, and we don't want to load it into a register as an optimization, diff --git a/gcc/collect2.c b/gcc/collect2.c index cc372374c00..89feaa4c185 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -2045,6 +2045,7 @@ write_c_file_stat (stream, name) /* Write the constructor/destructor tables. */ +#ifndef LD_INIT_SWITCH static void write_c_file_glob (stream, name) FILE *stream; @@ -2108,6 +2109,7 @@ write_c_file_glob (stream, name) fprintf (stream, "extern entry_pt %s;\n", NAME__MAIN); fprintf (stream, "entry_pt *__main_reference = %s;\n\n", NAME__MAIN); } +#endif /* ! LD_INIT_SWITCH */ static void write_c_file (stream, name) diff --git a/gcc/combine.c b/gcc/combine.c index 81f4d9bb6e2..6404787db2e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1662,8 +1662,10 @@ try_combine (i3, i2, i1) && XEXP (SET_SRC (PATTERN (i3)), 1) == const0_rtx && rtx_equal_p (XEXP (SET_SRC (PATTERN (i3)), 0), i2dest)) { +#ifdef EXTRA_CC_MODES rtx *cc_use; enum machine_mode compare_mode; +#endif newpat = PATTERN (i3); SUBST (XEXP (SET_SRC (newpat), 0), i2src); diff --git a/gcc/cpplib.c b/gcc/cpplib.c index f5ca073694f..aff4054fda7 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1,5 +1,5 @@ /* CPP Library. - Copyright (C) 1986, 87, 89, 92-6, 1997 Free Software Foundation, Inc. + Copyright (C) 1986, 87, 89, 92-7, 1998 Free Software Foundation, Inc. Contributed by Per Bothner, 1994-95. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -3969,7 +3969,6 @@ do_ident (pfile, keyword, buf, limit) U_CHAR *buf, *limit; { /* long old_written = CPP_WRITTEN (pfile);*/ - int len; /* Allow #ident in system headers, since that's not user's fault. */ if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) @@ -4289,14 +4288,13 @@ skip_if_group (pfile, any) int any; { int c; - int at_beg_of_line = 1; struct directive *kt; IF_STACK_FRAME *save_if_stack = pfile->if_stack; /* don't pop past here */ #if 0 U_CHAR *beg_of_line = bp; #endif register int ident_length; - U_CHAR *ident, *after_ident; + U_CHAR *ident; struct parse_marker line_start_mark; parse_set_mark (&line_start_mark, pfile); @@ -4655,7 +4653,6 @@ cpp_get_token (pfile) if (opts->put_out_comments) { cpp_buffer *pbuf = CPP_BUFFER (pfile); - long dummy; U_CHAR *start = pbuf->buf + start_mark.position; int len = pbuf->cur - start; CPP_RESERVE(pfile, 1 + len); diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 101574f2750..1c760b20e8e 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1,5 +1,5 @@ /* Output dbx-format symbol table information from GNU compiler. - Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -162,8 +162,6 @@ static int have_used_extensions = 0; static int source_label_number = 1; -static int scope_labelno = 0; - char *getpwd (); /* Typical USG systems don't have stab.h, and they also have @@ -333,7 +331,9 @@ void dbxout_types (); void dbxout_args (); void dbxout_symbol (); +#ifndef NO_DBX_FUNCTION_END static void dbxout_function_end PROTO((void)); +#endif static void dbxout_typedefs PROTO((tree)); static void dbxout_type_index PROTO((tree)); static void dbxout_continue PROTO((void)); @@ -352,9 +352,11 @@ static void dbxout_finish_symbol PROTO((tree)); static void dbxout_block PROTO((tree, int, tree)); static void dbxout_really_begin_function PROTO((tree)); +#ifndef NO_DBX_FUNCTION_END static void dbxout_function_end () { + static int scope_labelno = 0; char lscope_label_name[100]; /* Convert Ltext into the appropriate format for local labels in case the system doesn't insert underscores in front of user generated @@ -371,6 +373,7 @@ dbxout_function_end () assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); fprintf (asmfile, "\n"); } +#endif /* ! NO_DBX_FUNCTION_END */ /* At the beginning of compilation, start writing the symbol table. Initialize `typevec' and output the standard data types of C. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0911e7dbeba..d46aa3a98ea 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1,5 +1,5 @@ /* Output Dwarf2 format symbol table information from the GNU C compiler. - Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 95-97, 1998 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). Extensively modified by Jason Merrill (jason@cygnus.com). @@ -7205,7 +7205,9 @@ add_subscript_info (type_die, type) register dw_die_ref type_die; register tree type; { +#ifndef MIPS_DEBUGGING_INFO register unsigned dimension_number; +#endif register tree lower, upper; register dw_die_ref subrange_die; diff --git a/gcc/expr.c b/gcc/expr.c index 8ae48349150..8edc49ea338 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7624,7 +7624,6 @@ expand_builtin_setjmp (buf_addr, target, first_label, next_label) rtx lab1 = gen_label_rtx (); enum machine_mode sa_mode = Pmode, value_mode; rtx stack_save; - int i; value_mode = TYPE_MODE (integer_type_node); @@ -7696,6 +7695,7 @@ expand_builtin_setjmp (buf_addr, target, first_label, next_label) if (fixed_regs[ARG_POINTER_REGNUM]) { #ifdef ELIMINABLE_REGS + int i; static struct elims {int from, to;} elim_regs[] = ELIMINABLE_REGS; for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++) @@ -7729,7 +7729,9 @@ expand_builtin_setjmp (buf_addr, target, first_label, next_label) emit_insn (gen_nonlocal_goto_receiver ()); else #endif - ; /* Nothing */ + { + ; /* Nothing */ + } /* Set TARGET, and branch to the next-time-through label. */ emit_move_insn (target, gen_lowpart (GET_MODE (target), static_chain_rtx)); diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 3e235035060..53105ba1a16 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -1,5 +1,5 @@ /* fix-header.c - Make C header file suitable for C++. - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94-97, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -26,7 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ an argument list), and it is a "standard" function listed in the file sys-protos.h (and with a non-empty argument list), then the declaration is converted to a complete prototype by replacing - the empty parameter list with the argument lust from sys-protos.h. + the empty parameter list with the argument list from sys-protos.h. * The program can be given a list of (names of) required standard functions (such as fclose for stdio.h). If a required function @@ -898,7 +898,7 @@ inf_skip_spaces (c) c = INF_GET (); if (c != '*') { - INF_UNGET (c); + (void) INF_UNGET (c); return '/'; } c = INF_GET (); @@ -999,7 +999,7 @@ check_protection (ifndef_line, endif_line) return 0; protect_name = xstrdup (buf.base); - INF_UNGET (c); + (void) INF_UNGET (c); c = inf_read_upto (&buf, '\n'); if (c == EOF) return 0; @@ -1268,7 +1268,7 @@ main (argc, argv) if (isalpha (c) || c == '_') { c = inf_scan_ident (&buf, c); - INF_UNGET (c); + (void) INF_UNGET (c); fputs (buf.base, outf); fn = lookup_std_proto (buf.base, strlen (buf.base)); /* We only want to edit the declaration matching the one @@ -1289,7 +1289,7 @@ main (argc, argv) else { putc ('(', outf); - INF_UNGET (c); + (void) INF_UNGET (c); } } else diff --git a/gcc/flow.c b/gcc/flow.c index ced06071438..54ec3136f23 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -1,5 +1,5 @@ /* Data flow analysis for GNU compiler. - Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -678,10 +678,6 @@ find_basic_blocks_1 (f, nonlocal_label_list, live_reachable_p) /* Now delete the code for any basic blocks that can't be reached. They can occur because jump_optimize does not recognize - - - /* Now delete the code for any basic blocks that can't be reached. - They can occur because jump_optimize does not recognize unreachable loops as unreachable. */ deleted = 0; diff --git a/gcc/function.c b/gcc/function.c index 192bc5361a6..19a1c20bd81 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -427,7 +427,9 @@ static rtx round_trampoline_addr PROTO((rtx)); static tree blocks_nreverse PROTO((tree)); static int all_blocks PROTO((tree, tree *)); static int *record_insns PROTO((rtx)); +#if defined (HAVE_prologue) || defined (HAVE_epilogue) static int contains PROTO((rtx, int *)); +#endif /* HAVE_prologue || HAVE_epilogue */ static void put_addressof_into_stack PROTO((rtx)); static void purge_addressof_1 PROTO((rtx *, rtx, int)); @@ -2057,7 +2059,6 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements) enum machine_mode wanted_mode = insn_operand_mode[(int) CODE_FOR_insv][0]; enum machine_mode is_mode = GET_MODE (tem); - int width = INTVAL (XEXP (outerdest, 1)); int pos = INTVAL (XEXP (outerdest, 2)); /* If we have a narrower mode, we can do something. */ @@ -5873,6 +5874,7 @@ record_insns (insns) /* Determine how many INSN_UIDs in VEC are part of INSN. */ +#if defined (HAVE_prologue) || defined (HAVE_epilogue) static int contains (insn, vec) rtx insn; @@ -5898,6 +5900,7 @@ contains (insn, vec) } return 0; } +#endif /* HAVE_prologue || HAVE_epilogue */ /* Generate the prologue and epilogue RTL if the machine supports it. Thread this into place with notes indicating where the prologue ends and where diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c index 0284c18ba4a..b922ce8cffe 100644 --- a/gcc/gen-protos.c +++ b/gcc/gen-protos.c @@ -1,5 +1,5 @@ /* gen-protos.c - massages a list of prototypes, for use by fixproto. - Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 94-96, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -147,7 +147,6 @@ main (argc, argv) FILE *outf = stdout; int i; sstring linebuf; - char **optr; struct fn_decl fn_decl; i = strlen (argv[0]); diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index be87cc224cb..3863e20ac6f 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1198,7 +1198,7 @@ debug_control_flow () static int build_control_flow () { - int i, j; + int i; int_list_ptr *s_preds; int_list_ptr *s_succs; int_list_ptr succ; diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index f1032a58239..6ccc1187f0a 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -392,7 +392,9 @@ __udiv_w_sdiv (USItype *rp, USItype a1, USItype a0, USItype d) /* If sdiv_qrnnd doesn't exist, define dummy __udiv_w_sdiv. */ USItype __udiv_w_sdiv (USItype *rp, USItype a1, USItype a0, USItype d) -{} +{ + return 0; +} #endif #endif @@ -3291,7 +3293,6 @@ __sjpopnthrow () { struct eh_context *eh = (*get_eh_context) (); void ***dhc = &eh->dynamic_handler_chain; - void *jmpbuf; void (*func)(void *, int); void *arg; void ***cleanup; @@ -3598,7 +3599,6 @@ label: else { int i; - void *val; /* Unwind all the frames between this one and the handler by copying their saved register values into our register save slots. */ diff --git a/gcc/protoize.c b/gcc/protoize.c index 4324ae506d0..98f3e33d0d2 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -167,10 +167,12 @@ typedef char * const_pointer_type; #else /* !defined(POSIX) */ +#ifndef F_OK #define R_OK 4 /* Test for Read permission */ #define W_OK 2 /* Test for Write permission */ #define X_OK 1 /* Test for eXecute permission */ #define F_OK 0 /* Test for existence of File */ +#endif #ifndef O_RDONLY #define O_RDONLY 0 diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c index 00dc83869ac..4246eeada2b 100644 --- a/gcc/scan-decls.c +++ b/gcc/scan-decls.c @@ -1,5 +1,5 @@ /* scan-decls.c - Extracts declarations from cpp output. - Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -82,7 +82,6 @@ scan_decls (pfile, argc, argv) { int saw_extern, saw_inline; int start_written; - int old_written; /* If declarator_start is non-zero, it marks the start of the current declarator. If it is zero, we are either still parsing the decl-specs, or prev_id_start marks the start of the declarator. */ |