OSDN Git Service

* c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Feb 1998 22:55:54 +0000 (22:55 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Feb 1998 22:55:54 +0000 (22:55 +0000)
        * 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

23 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/c-decl.c
gcc/calls.c
gcc/dbxout.c
gcc/except.c
gcc/explow.c
gcc/genattr.c
gcc/genattrtab.c
gcc/genconfig.c
gcc/genemit.c
gcc/genextract.c
gcc/genflags.c
gcc/genopinit.c
gcc/genoutput.c
gcc/genpeep.c
gcc/genrecog.c
gcc/global.c
gcc/integrate.c
gcc/prefix.c
gcc/stmt.c
gcc/stupid.c
gcc/unroll.c

index 1d00e4d..d187d09 100644 (file)
@@ -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.
index dd2bd0f..8ff114a 100644 (file)
@@ -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
index 7ac50de..ed23500 100644 (file)
@@ -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 */
index 786d9b5..3a4244a 100644 (file)
@@ -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;
index a1d828f..7fa9139 100644 (file)
@@ -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"
index 12abb10..3d6ace9 100644 (file)
@@ -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.  */
 
index 0fcc547..e9cf9e5 100644 (file)
@@ -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),
index c351fc5..5be826b 100644 (file)
@@ -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;
 
index c3c721f..0560e93 100644 (file)
@@ -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"
index 404534e..cc012cb 100644 (file)
@@ -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));
index 96bc532..c556e14 100644 (file)
@@ -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;
 
index f222de1..3577a2f 100644 (file)
@@ -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"
index f8b3983..68f0c83 100644 (file)
@@ -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;
 
index 3087e38..6ee2f4f 100644 (file)
@@ -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");
index 8fdf4ca..c263f27 100644 (file)
@@ -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':
index f8159c8..357376b 100644 (file)
@@ -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;
 
index c61ae09..ef85c6e 100644 (file)
@@ -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;
index 3ab4d70..5033f39 100644 (file)
@@ -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"
index ec1f8b8..1dd29bd 100644 (file)
@@ -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"
index bf501c7..09f4f19 100644 (file)
@@ -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
index 30c39ce..7cb99ad 100644 (file)
@@ -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;
 
index 4800389..318b5b1 100644 (file)
@@ -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"
index ea708f0..d814dd9 100644 (file)
@@ -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;