diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-07 22:55:54 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-07 22:55:54 +0000 |
commit | 3ef9782d37366cbfcab1b7f47e68771e71f1b728 (patch) | |
tree | 4653e3f8759069cc25169a6b0035d7270415f293 /gcc | |
parent | 620542d5ec1167b92f70cdc6d24c15ccc3270d03 (diff) | |
download | gcc-3ef9782d37366cbfcab1b7f47e68771e71f1b728.tar.gz |
* c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.
* calls.c (expand_call): Remove unused variables funtree,
n_regs, and tmpmode.
* dbxout.c, except.c: Include <string.h>/<strings.h>.
* explow.c: (plus_constant_for_output_wide) Removed unused
variable all_constant.
* c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c
genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c,
genrecog.c, global.c, integrate.c , stupid.c : Include
<stdlib.h>.
* genextract.c: (walk_rtx) Remove unused variable link.
* genrecog.c: (concat) Remove unreferenced static function.
* prefix.c: Include <string.h>/<strings.h>, <stdlib.h>
* stmt.c: Include <stdlib.h>.
(expand_asm_operands): Remove unused variable val1.
(expand_return): Remove unused variable block.
(pushcase): Remove unused variables l and n.
(pushcaserange): Likewise.
* unroll.c (unroll_loop): Remove unused variable temp.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 31 | ||||
-rw-r--r-- | gcc/c-common.c | 13 | ||||
-rw-r--r-- | gcc/c-decl.c | 4 | ||||
-rw-r--r-- | gcc/calls.c | 4 | ||||
-rw-r--r-- | gcc/dbxout.c | 8 | ||||
-rw-r--r-- | gcc/except.c | 4 | ||||
-rw-r--r-- | gcc/explow.c | 1 | ||||
-rw-r--r-- | gcc/genattr.c | 4 | ||||
-rw-r--r-- | gcc/genattrtab.c | 4 | ||||
-rw-r--r-- | gcc/genconfig.c | 10 | ||||
-rw-r--r-- | gcc/genemit.c | 4 | ||||
-rw-r--r-- | gcc/genextract.c | 11 | ||||
-rw-r--r-- | gcc/genflags.c | 4 | ||||
-rw-r--r-- | gcc/genopinit.c | 8 | ||||
-rw-r--r-- | gcc/genoutput.c | 11 | ||||
-rw-r--r-- | gcc/genpeep.c | 4 | ||||
-rw-r--r-- | gcc/genrecog.c | 24 | ||||
-rw-r--r-- | gcc/global.c | 5 | ||||
-rw-r--r-- | gcc/integrate.c | 5 | ||||
-rw-r--r-- | gcc/prefix.c | 12 | ||||
-rw-r--r-- | gcc/stmt.c | 10 | ||||
-rw-r--r-- | gcc/stupid.c | 5 | ||||
-rw-r--r-- | gcc/unroll.c | 2 |
23 files changed, 150 insertions, 38 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d00e4da231..d187d094c9d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,34 @@ +Sat Feb 7 23:54:29 1998 Robert Lipe <robertl@dgii.com> + + * c-common.c: Include <stdlib.h> and <string.h>/<strings.h>. + + * calls.c (expand_call): Remove unused variables funtree, + n_regs, and tmpmode. + + * dbxout.c, except.c: Include <string.h>/<strings.h>. + + * explow.c: (plus_constant_for_output_wide) Removed unused + variable all_constant. + + * c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c + genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c, + genrecog.c, global.c, integrate.c , stupid.c : Include + <stdlib.h>. + + * genextract.c: (walk_rtx) Remove unused variable link. + + * genrecog.c: (concat) Remove unreferenced static function. + + * prefix.c: Include <string.h>/<strings.h>, <stdlib.h> + + * stmt.c: Include <stdlib.h>. + (expand_asm_operands): Remove unused variable val1. + (expand_return): Remove unused variable block. + (pushcase): Remove unused variables l and n. + (pushcaserange): Likewise. + + * unroll.c (unroll_loop): Remove unused variable temp. + Sat Feb 7 23:46:09 1998 Greg McGary <gkm@gnu.org> * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only. diff --git a/gcc/c-common.c b/gcc/c-common.c index dd2bd0f7a71..8ff114a616c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -27,6 +27,19 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" #include <ctype.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + + #ifndef WCHAR_TYPE_SIZE #ifdef INT_TYPE_SIZE #define WCHAR_TYPE_SIZE INT_TYPE_SIZE diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 7ac50de75de..ed23500448a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -34,6 +34,10 @@ Boston, MA 02111-1307, USA. */ #include "c-tree.h" #include "c-lex.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + /* In grokdeclarator, distinguish syntactic contexts of declarators. */ enum decl_context { NORMAL, /* Ordinary declaration */ diff --git a/gcc/calls.c b/gcc/calls.c index 786d9b50920..3a4244a64f4 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -487,8 +487,6 @@ expand_call (exp, target, ignore) tree actparms = TREE_OPERAND (exp, 1); /* RTX for the function to be called. */ rtx funexp; - /* Tree node for the function to be called (not the address!). */ - tree funtree; /* Data type of the function. */ tree funtype; /* Declaration of the function being called, @@ -2110,9 +2108,7 @@ expand_call (exp, target, ignore) Deal with them explicitly by copying from the return registers into the target MEM locations. */ int bytes = int_size_in_bytes (TREE_TYPE (exp)); - int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; int i; - enum machine_mode tmpmode; rtx src, dst; int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (exp)), BITS_PER_WORD); int bitpos, xbitpos, big_endian_correction = 0; diff --git a/gcc/dbxout.c b/gcc/dbxout.c index a1d828f9f23..7fa9139b9d8 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -72,6 +72,14 @@ Boston, MA 02111-1307, USA. */ #include <stdio.h> #include <errno.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif + #include "tree.h" #include "rtl.h" #include "flags.h" diff --git a/gcc/except.c b/gcc/except.c index 12abb103d65..3d6ace9a8e9 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -405,6 +405,10 @@ Boston, MA 02111-1307, USA. */ #include "recog.h" #include "output.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + /* One to use setjmp/longjmp method of generating code for exception handling. */ diff --git a/gcc/explow.c b/gcc/explow.c index 0fcc547ff56..e9cf9e5993d 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -153,7 +153,6 @@ plus_constant_for_output_wide (x, c) { register RTX_CODE code = GET_CODE (x); register enum machine_mode mode = GET_MODE (x); - int all_constant = 0; if (GET_CODE (x) == LO_SUM) return gen_rtx_LO_SUM (mode, XEXP (x, 0), diff --git a/gcc/genattr.c b/gcc/genattr.c index c351fc5ad5f..5be826b35de 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index c3c721fd767..0560e931ac9 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -121,6 +121,10 @@ Boston, MA 02111-1307, USA. */ # include <sys/resource.h> #endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + /* We must include obstack.h after <sys/time.h>, to avoid lossage with /usr/include/sys/stdtypes.h on Sun OS 4.x. */ #include "obstack.h" diff --git a/gcc/genconfig.c b/gcc/genconfig.c index 404534e120c..cc012cbd6ed 100644 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -1,7 +1,6 @@ /* Generate from machine description: - - some #define configuration flags. - Copyright (C) 1987, 1991 Free Software Foundation, Inc. + Copyright (C) 1987, 1991, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -26,6 +25,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -142,6 +145,9 @@ walk_insn_part (part, recog_p, non_pc_set_src) case REG: case CONST_INT: case SYMBOL_REF: case PC: return; + + default: + break; } format_ptr = GET_RTX_FORMAT (GET_CODE (part)); diff --git a/gcc/genemit.c b/gcc/genemit.c index 96bc532a25b..c556e14141d 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; diff --git a/gcc/genextract.c b/gcc/genextract.c index f222de1f335..3577a2f67fe 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -1,5 +1,5 @@ /* Generate code from machine description to extract operands from insn as rtl. - Copyright (C) 1987, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1987, 1991, 1992, 1993, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" #include "insn-config.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -196,7 +200,6 @@ walk_rtx (x, path) register int i; register int len; register char *fmt; - register struct code_ptr *link; int depth = strlen (path); char *newpath; @@ -275,6 +278,9 @@ walk_rtx (x, path) case ADDRESS: walk_rtx (XEXP (x, 0), path); return; + + default: + break; } newpath = (char *) alloca (depth + 2); @@ -438,6 +444,7 @@ main (argc, argv) from the machine description file `md'. */\n\n"); printf ("#include \"config.h\"\n"); + printf ("#include <stdio.h>\n"); printf ("#include \"rtl.h\"\n\n"); /* This variable exists only so it can be the "location" diff --git a/gcc/genflags.c b/gcc/genflags.c index f8b39833f65..68f0c8368f6 100644 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 3087e381c99..6ee2f4fd859 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -1,5 +1,5 @@ /* Generate code to initialize optabs from machine description. - Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -25,6 +25,11 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" #include <ctype.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -354,6 +359,7 @@ main (argc, argv) from the machine description file `md'. */\n\n"); printf ("#include \"config.h\"\n"); + printf ("#include <stdio.h>\n"); printf ("#include \"rtl.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"insn-flags.h\"\n"); diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 8fdf4ca2c11..c263f271e30 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -95,6 +95,10 @@ given in the entry is a constant (it does not start with `*'). */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + /* No instruction can have more operands than this. Sorry for this arbitrary limit, but what machine will have an instruction with this many operands? */ @@ -180,6 +184,8 @@ output_prologue () from the machine description file `md'. */\n\n"); printf ("#include \"config.h\"\n"); + printf ("#include <stdio.h>\n"); + printf ("#include \"flags.h\"\n"); printf ("#include \"rtl.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"hard-reg-set.h\"\n"); @@ -191,7 +197,6 @@ from the machine description file `md'. */\n\n"); printf ("#include \"insn-codes.h\"\n\n"); printf ("#include \"recog.h\"\n\n"); - printf ("#include <stdio.h>\n"); printf ("#include \"output.h\"\n"); } @@ -514,6 +519,9 @@ scan_operands (part, this_address_p, this_strict_low) case STRICT_LOW_PART: scan_operands (XEXP (part, 0), 0, 1); return; + + default: + break; } format_ptr = GET_RTX_FORMAT (GET_CODE (part)); @@ -522,6 +530,7 @@ scan_operands (part, this_address_p, this_strict_low) switch (*format_ptr++) { case 'e': + case 'u': scan_operands (XEXP (part, i), 0, 0); break; case 'E': diff --git a/gcc/genpeep.c b/gcc/genpeep.c index f8159c82cfe..357376b8590 100644 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; diff --git a/gcc/genrecog.c b/gcc/genrecog.c index c61ae097389..ef85c6e6fbd 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -51,6 +51,10 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "obstack.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -191,7 +195,6 @@ static void change_state PROTO((char *, char *, int)); static char *copystr PROTO((char *)); static void mybzero PROTO((char *, unsigned)); static void mybcopy PROTO((char *, char *, unsigned)); -static char *concat PROTO((char *, char *)); static void fatal PROTO((char *)); char *xrealloc PROTO((char *, unsigned)); char *xmalloc PROTO((unsigned)); @@ -1646,25 +1649,6 @@ mybcopy (in, out, length) *out++ = *in++; } -static char * -concat (s1, s2) - char *s1, *s2; -{ - register char *tem; - - if (s1 == 0) - return s2; - if (s2 == 0) - return s1; - - tem = (char *) xmalloc (strlen (s1) + strlen (s2) + 2); - strcpy (tem, s1); - strcat (tem, " "); - strcat (tem, s2); - - return tem; -} - char * xrealloc (ptr, size) char *ptr; diff --git a/gcc/global.c b/gcc/global.c index 3ab4d708af6..5033f3953d6 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -21,6 +21,11 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include <stdio.h> + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + #include "rtl.h" #include "flags.h" #include "basic-block.h" diff --git a/gcc/integrate.c b/gcc/integrate.c index ec1f8b81a3a..1dd29bdcf7d 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include <stdio.h> + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + #include "rtl.h" #include "tree.h" #include "regs.h" diff --git a/gcc/prefix.c b/gcc/prefix.c index bf501c74391..09f4f193c4e 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -71,6 +71,18 @@ Boston, MA 02111-1307, USA. */ #include <varargs.h> #endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif + #ifdef _WIN32 #include <windows.h> #endif diff --git a/gcc/stmt.c b/gcc/stmt.c index 30c39ce84e5..7cb99ad48ad 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -38,6 +38,10 @@ Boston, MA 02111-1307, USA. */ #include <stdio.h> #include <ctype.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + #include "rtl.h" #include "tree.h" #include "flags.h" @@ -1191,7 +1195,6 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) { tree val = TREE_VALUE (tail); tree type = TREE_TYPE (val); - tree val1; int j; int found_equal = 0; int found_plus = 0; @@ -2280,7 +2283,6 @@ expand_return (retval) register rtx op0; tree retval_rhs; int cleanups; - struct nesting *block; /* If function wants no value, give it none. */ if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) @@ -3842,8 +3844,6 @@ pushcase (value, converter, label, duplicate) register tree label; tree *duplicate; { - register struct case_node **l; - register struct case_node *n; tree index_type; tree nominal_type; @@ -3925,8 +3925,6 @@ pushcase_range (value1, value2, converter, label, duplicate) register tree label; tree *duplicate; { - register struct case_node **l; - register struct case_node *n; tree index_type; tree nominal_type; diff --git a/gcc/stupid.c b/gcc/stupid.c index 4800389a216..318b5b1a18e 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -44,6 +44,11 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include <stdio.h> + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + #include "rtl.h" #include "hard-reg-set.h" #include "regs.h" diff --git a/gcc/unroll.c b/gcc/unroll.c index ea708f0f482..d814dd901cf 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -831,7 +831,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before, if (precondition_loop_p (&initial_value, &final_value, &increment, loop_start, loop_end)) { - register rtx diff, temp; + register rtx diff ; enum machine_mode mode; rtx *labels; int abs_inc, neg_inc; |