Commit ccd043a9 by Robert Lipe Committed by Jeff Law

c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.

        * 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.

From-SVN: r17766
parent 6553db01
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> Sat Feb 7 23:46:09 1998 Greg McGary <gkm@gnu.org>
* c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only. * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only.
......
...@@ -27,6 +27,19 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,6 +27,19 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h" #include "obstack.h"
#include <ctype.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 #ifndef WCHAR_TYPE_SIZE
#ifdef INT_TYPE_SIZE #ifdef INT_TYPE_SIZE
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
......
...@@ -34,6 +34,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,6 +34,10 @@ Boston, MA 02111-1307, USA. */
#include "c-tree.h" #include "c-tree.h"
#include "c-lex.h" #include "c-lex.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
/* In grokdeclarator, distinguish syntactic contexts of declarators. */ /* In grokdeclarator, distinguish syntactic contexts of declarators. */
enum decl_context enum decl_context
{ NORMAL, /* Ordinary declaration */ { NORMAL, /* Ordinary declaration */
......
...@@ -487,8 +487,6 @@ expand_call (exp, target, ignore) ...@@ -487,8 +487,6 @@ expand_call (exp, target, ignore)
tree actparms = TREE_OPERAND (exp, 1); tree actparms = TREE_OPERAND (exp, 1);
/* RTX for the function to be called. */ /* RTX for the function to be called. */
rtx funexp; rtx funexp;
/* Tree node for the function to be called (not the address!). */
tree funtree;
/* Data type of the function. */ /* Data type of the function. */
tree funtype; tree funtype;
/* Declaration of the function being called, /* Declaration of the function being called,
...@@ -2110,9 +2108,7 @@ expand_call (exp, target, ignore) ...@@ -2110,9 +2108,7 @@ expand_call (exp, target, ignore)
Deal with them explicitly by copying from the return registers Deal with them explicitly by copying from the return registers
into the target MEM locations. */ into the target MEM locations. */
int bytes = int_size_in_bytes (TREE_TYPE (exp)); int bytes = int_size_in_bytes (TREE_TYPE (exp));
int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
int i; int i;
enum machine_mode tmpmode;
rtx src, dst; rtx src, dst;
int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (exp)), BITS_PER_WORD); int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (exp)), BITS_PER_WORD);
int bitpos, xbitpos, big_endian_correction = 0; int bitpos, xbitpos, big_endian_correction = 0;
......
...@@ -72,6 +72,14 @@ Boston, MA 02111-1307, USA. */ ...@@ -72,6 +72,14 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> #include <stdio.h>
#include <errno.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 "tree.h"
#include "rtl.h" #include "rtl.h"
#include "flags.h" #include "flags.h"
......
...@@ -405,6 +405,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -405,6 +405,10 @@ Boston, MA 02111-1307, USA. */
#include "recog.h" #include "recog.h"
#include "output.h" #include "output.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
/* One to use setjmp/longjmp method of generating code for exception /* One to use setjmp/longjmp method of generating code for exception
handling. */ handling. */
......
...@@ -153,7 +153,6 @@ plus_constant_for_output_wide (x, c) ...@@ -153,7 +153,6 @@ plus_constant_for_output_wide (x, c)
{ {
register RTX_CODE code = GET_CODE (x); register RTX_CODE code = GET_CODE (x);
register enum machine_mode mode = GET_MODE (x); register enum machine_mode mode = GET_MODE (x);
int all_constant = 0;
if (GET_CODE (x) == LO_SUM) if (GET_CODE (x) == LO_SUM)
return gen_rtx_LO_SUM (mode, XEXP (x, 0), return gen_rtx_LO_SUM (mode, XEXP (x, 0),
......
...@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
......
...@@ -121,6 +121,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -121,6 +121,10 @@ Boston, MA 02111-1307, USA. */
# include <sys/resource.h> # include <sys/resource.h>
#endif #endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
/* We must include obstack.h after <sys/time.h>, to avoid lossage with /* We must include obstack.h after <sys/time.h>, to avoid lossage with
/usr/include/sys/stdtypes.h on Sun OS 4.x. */ /usr/include/sys/stdtypes.h on Sun OS 4.x. */
#include "obstack.h" #include "obstack.h"
......
/* Generate from machine description: /* Generate from machine description:
- some #define configuration flags. - 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. This file is part of GNU CC.
...@@ -26,6 +25,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -26,6 +25,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
...@@ -142,6 +145,9 @@ walk_insn_part (part, recog_p, non_pc_set_src) ...@@ -142,6 +145,9 @@ walk_insn_part (part, recog_p, non_pc_set_src)
case REG: case CONST_INT: case SYMBOL_REF: case REG: case CONST_INT: case SYMBOL_REF:
case PC: case PC:
return; return;
default:
break;
} }
format_ptr = GET_RTX_FORMAT (GET_CODE (part)); format_ptr = GET_RTX_FORMAT (GET_CODE (part));
......
...@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
......
/* Generate code from machine description to extract operands from insn as rtl. /* 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. This file is part of GNU CC.
...@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h" #include "obstack.h"
#include "insn-config.h" #include "insn-config.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
...@@ -196,7 +200,6 @@ walk_rtx (x, path) ...@@ -196,7 +200,6 @@ walk_rtx (x, path)
register int i; register int i;
register int len; register int len;
register char *fmt; register char *fmt;
register struct code_ptr *link;
int depth = strlen (path); int depth = strlen (path);
char *newpath; char *newpath;
...@@ -275,6 +278,9 @@ walk_rtx (x, path) ...@@ -275,6 +278,9 @@ walk_rtx (x, path)
case ADDRESS: case ADDRESS:
walk_rtx (XEXP (x, 0), path); walk_rtx (XEXP (x, 0), path);
return; return;
default:
break;
} }
newpath = (char *) alloca (depth + 2); newpath = (char *) alloca (depth + 2);
...@@ -438,6 +444,7 @@ main (argc, argv) ...@@ -438,6 +444,7 @@ main (argc, argv)
from the machine description file `md'. */\n\n"); from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n"); printf ("#include \"config.h\"\n");
printf ("#include <stdio.h>\n");
printf ("#include \"rtl.h\"\n\n"); printf ("#include \"rtl.h\"\n\n");
/* This variable exists only so it can be the "location" /* This variable exists only so it can be the "location"
......
...@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
......
/* Generate code to initialize optabs from machine description. /* 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. This file is part of GNU CC.
...@@ -25,6 +25,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,6 +25,11 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h" #include "obstack.h"
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
...@@ -354,6 +359,7 @@ main (argc, argv) ...@@ -354,6 +359,7 @@ main (argc, argv)
from the machine description file `md'. */\n\n"); from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n"); printf ("#include \"config.h\"\n");
printf ("#include <stdio.h>\n");
printf ("#include \"rtl.h\"\n"); printf ("#include \"rtl.h\"\n");
printf ("#include \"flags.h\"\n"); printf ("#include \"flags.h\"\n");
printf ("#include \"insn-flags.h\"\n"); printf ("#include \"insn-flags.h\"\n");
......
...@@ -95,6 +95,10 @@ given in the entry is a constant (it does not start with `*'). */ ...@@ -95,6 +95,10 @@ given in the entry is a constant (it does not start with `*'). */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
/* No instruction can have more operands than this. /* No instruction can have more operands than this.
Sorry for this arbitrary limit, but what machine will Sorry for this arbitrary limit, but what machine will
have an instruction with this many operands? */ have an instruction with this many operands? */
...@@ -180,6 +184,8 @@ output_prologue () ...@@ -180,6 +184,8 @@ output_prologue ()
from the machine description file `md'. */\n\n"); from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n"); printf ("#include \"config.h\"\n");
printf ("#include <stdio.h>\n");
printf ("#include \"flags.h\"\n");
printf ("#include \"rtl.h\"\n"); printf ("#include \"rtl.h\"\n");
printf ("#include \"regs.h\"\n"); printf ("#include \"regs.h\"\n");
printf ("#include \"hard-reg-set.h\"\n"); printf ("#include \"hard-reg-set.h\"\n");
...@@ -191,7 +197,6 @@ from the machine description file `md'. */\n\n"); ...@@ -191,7 +197,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"insn-codes.h\"\n\n"); printf ("#include \"insn-codes.h\"\n\n");
printf ("#include \"recog.h\"\n\n"); printf ("#include \"recog.h\"\n\n");
printf ("#include <stdio.h>\n");
printf ("#include \"output.h\"\n"); printf ("#include \"output.h\"\n");
} }
...@@ -514,6 +519,9 @@ scan_operands (part, this_address_p, this_strict_low) ...@@ -514,6 +519,9 @@ scan_operands (part, this_address_p, this_strict_low)
case STRICT_LOW_PART: case STRICT_LOW_PART:
scan_operands (XEXP (part, 0), 0, 1); scan_operands (XEXP (part, 0), 0, 1);
return; return;
default:
break;
} }
format_ptr = GET_RTX_FORMAT (GET_CODE (part)); format_ptr = GET_RTX_FORMAT (GET_CODE (part));
...@@ -522,6 +530,7 @@ scan_operands (part, this_address_p, this_strict_low) ...@@ -522,6 +530,7 @@ scan_operands (part, this_address_p, this_strict_low)
switch (*format_ptr++) switch (*format_ptr++)
{ {
case 'e': case 'e':
case 'u':
scan_operands (XEXP (part, i), 0, 0); scan_operands (XEXP (part, i), 0, 0);
break; break;
case 'E': case 'E':
......
...@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
......
...@@ -51,6 +51,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -51,6 +51,10 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
static struct obstack obstack; static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
...@@ -191,7 +195,6 @@ static void change_state PROTO((char *, char *, int)); ...@@ -191,7 +195,6 @@ static void change_state PROTO((char *, char *, int));
static char *copystr PROTO((char *)); static char *copystr PROTO((char *));
static void mybzero PROTO((char *, unsigned)); static void mybzero PROTO((char *, unsigned));
static void mybcopy PROTO((char *, char *, unsigned)); static void mybcopy PROTO((char *, char *, unsigned));
static char *concat PROTO((char *, char *));
static void fatal PROTO((char *)); static void fatal PROTO((char *));
char *xrealloc PROTO((char *, unsigned)); char *xrealloc PROTO((char *, unsigned));
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
...@@ -1646,25 +1649,6 @@ mybcopy (in, out, length) ...@@ -1646,25 +1649,6 @@ mybcopy (in, out, length)
*out++ = *in++; *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 * char *
xrealloc (ptr, size) xrealloc (ptr, size)
char *ptr; char *ptr;
......
...@@ -21,6 +21,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,6 +21,11 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "rtl.h" #include "rtl.h"
#include "flags.h" #include "flags.h"
#include "basic-block.h" #include "basic-block.h"
......
...@@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "regs.h" #include "regs.h"
......
...@@ -71,6 +71,18 @@ Boston, MA 02111-1307, USA. */ ...@@ -71,6 +71,18 @@ Boston, MA 02111-1307, USA. */
#include <varargs.h> #include <varargs.h>
#endif #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 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif
......
...@@ -38,6 +38,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -38,6 +38,10 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "flags.h" #include "flags.h"
...@@ -1191,7 +1195,6 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) ...@@ -1191,7 +1195,6 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
{ {
tree val = TREE_VALUE (tail); tree val = TREE_VALUE (tail);
tree type = TREE_TYPE (val); tree type = TREE_TYPE (val);
tree val1;
int j; int j;
int found_equal = 0; int found_equal = 0;
int found_plus = 0; int found_plus = 0;
...@@ -2280,7 +2283,6 @@ expand_return (retval) ...@@ -2280,7 +2283,6 @@ expand_return (retval)
register rtx op0; register rtx op0;
tree retval_rhs; tree retval_rhs;
int cleanups; int cleanups;
struct nesting *block;
/* If function wants no value, give it none. */ /* If function wants no value, give it none. */
if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE)
...@@ -3842,8 +3844,6 @@ pushcase (value, converter, label, duplicate) ...@@ -3842,8 +3844,6 @@ pushcase (value, converter, label, duplicate)
register tree label; register tree label;
tree *duplicate; tree *duplicate;
{ {
register struct case_node **l;
register struct case_node *n;
tree index_type; tree index_type;
tree nominal_type; tree nominal_type;
...@@ -3925,8 +3925,6 @@ pushcase_range (value1, value2, converter, label, duplicate) ...@@ -3925,8 +3925,6 @@ pushcase_range (value1, value2, converter, label, duplicate)
register tree label; register tree label;
tree *duplicate; tree *duplicate;
{ {
register struct case_node **l;
register struct case_node *n;
tree index_type; tree index_type;
tree nominal_type; tree nominal_type;
......
...@@ -44,6 +44,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,6 +44,11 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "rtl.h" #include "rtl.h"
#include "hard-reg-set.h" #include "hard-reg-set.h"
#include "regs.h" #include "regs.h"
......
...@@ -831,7 +831,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before, ...@@ -831,7 +831,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
if (precondition_loop_p (&initial_value, &final_value, &increment, if (precondition_loop_p (&initial_value, &final_value, &increment,
loop_start, loop_end)) loop_start, loop_end))
{ {
register rtx diff, temp; register rtx diff ;
enum machine_mode mode; enum machine_mode mode;
rtx *labels; rtx *labels;
int abs_inc, neg_inc; int abs_inc, neg_inc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment