]> gcc.gnu.org Git - gcc.git/commitdiff
Some fixes for KNR compilers:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 6 Jun 1998 09:25:16 +0000 (09:25 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 6 Jun 1998 09:25:16 +0000 (09:25 +0000)
        * gencheck.c: Remove redundant stdio.h include.  Add a definition
        of xmalloc for when we are forced to link with alloca.o.
        * reload1.c (reload_reg_free_for_value_p): Use `(unsigned)1'
        instead of `1U'.
        * fold-const.c (constant_boolean_node): Make definition static to
        match the prototype.

From-SVN: r20261

gcc/ChangeLog
gcc/fold-const.c
gcc/gencheck.c
gcc/reload1.c

index ae849d4d94a66ba113312c2028da981eea8f1490..d473e5a4926a480adeaade8b44a4e5110385edb4 100644 (file)
@@ -1,3 +1,14 @@
+Sat Jun  6 12:17:12 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * gencheck.c: Remove redundant stdio.h include.  Add a definition
+       of xmalloc for when we are forced to link with alloca.o.
+
+       * reload1.c (reload_reg_free_for_value_p): Use `(unsigned)1'
+       instead of `1U'.
+
+       * fold-const.c (constant_boolean_node): Make definition static to
+       match the prototype.
+
 Fri Jun  5 15:53:17 1998  Per Bothner  <bothner@cygnus.com>
 
        * gcc.c (lang_specific_pre_link):  New LANG_SPECIFIC_DRIVER function.
index d8477645c530375890b385602c27024ec62c628b..5daa253a44962b1e568214dfaf43f5045c48dc60 100644 (file)
@@ -3740,7 +3740,7 @@ strip_compound_expr (t, s)
 /* Return a node which has the indicated constant VALUE (either 0 or
    1), and is of the indicated TYPE.  */
 
-tree
+static tree
 constant_boolean_node (value, type)
      int value;
      tree type;
index 6b5612ded31ecd5116bcb12ea65e556563e8a9bc..811a7dca752bd3414e74d0a31127bd5a928b9626 100644 (file)
@@ -18,7 +18,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#include <stdio.h>
 #include "hconfig.h"
 #include "system.h"
 
@@ -60,3 +59,22 @@ int main (argc, argv)
   return 0;
 }
 
+#if defined(USE_C_ALLOCA) && !defined(__GNUC__)
+/* FIXME: We only need an xmalloc definition because we are forced to
+   link with alloca.o on some platforms.  This should go away if/when
+   we link against libiberty.a. (ghazi@caip.rutgers.edu 6/3/98) */
+char *
+xmalloc (nbytes)
+     int nbytes;
+{
+  char *tmp = (char *) malloc (nbytes);
+
+  if (!tmp)
+    {
+      fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
+      exit (FATAL_EXIT_CODE);
+    }
+
+  return tmp;
+}
+#endif /* USE_C_ALLOCA && !__GNUC__ */
index b1a13faa3e143e1aeba40d2d3e25d5df155ab118..bc2a51a4be0811e008dda00849f15b6c447e183d 100644 (file)
@@ -5055,7 +5055,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum)
       rtx reg = reload_reg_rtx[i];
       if (reg && GET_CODE (reg) == REG
          && ((unsigned) regno - true_regnum (reg)
-             <= HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)) - 1U)
+             <= HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)) - (unsigned)1)
          && i != reloadnum)
        {
          if (out
This page took 0.097154 seconds and 5 git commands to generate.