summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-17 15:00:11 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-17 15:00:11 +0000
commit0aa40958727e98cae1ec6091810bde2838d55b3d (patch)
tree80b89240a48844dc4084342e504e7630722b7734 /gcc
parent1d322a970556023c6ef430b2617c126fefb1e9d2 (diff)
downloadgcc-0aa40958727e98cae1ec6091810bde2838d55b3d.tar.gz
* alloca.c: Respect USE_C_ALLOCA.
* gencheck.c (xmalloc): Ignore __GNUC__ for definition. * gengenrtl.c (xmalloc): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/alloca.c5
-rw-r--r--gcc/gencheck.c7
-rw-r--r--gcc/gengenrtl.c11
4 files changed, 17 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d788138f729..b7fbd76f363 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jul 17 14:58:44 1998 Richard Henderson <rth@cygnus.com>
+
+ * alloca.c: Respect USE_C_ALLOCA.
+ * gencheck.c (xmalloc): Ignore __GNUC__ for definition.
+ * gengenrtl.c (xmalloc): Likewise.
+
Fri Jul 17 14:18:14 1998 Richard Henderson <rth@cygnus.com>
* loop.h (struct induction): Add no_const_addval.
diff --git a/gcc/alloca.c b/gcc/alloca.c
index 8f98b73dbb9..0f8a21511db 100644
--- a/gcc/alloca.c
+++ b/gcc/alloca.c
@@ -36,8 +36,9 @@
#include "blockinput.h"
#endif
-/* If compiling with GCC 2, this file's not needed. */
-#if !defined (__GNUC__) || __GNUC__ < 2
+/* If compiling with GCC 2, this file's not needed. Except of course if
+ the C alloca is explicitly requested. */
+#if defined (USE_C_ALLOCA) || !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
diff --git a/gcc/gencheck.c b/gcc/gencheck.c
index f7548ceda0c..e53f4ab7ad5 100644
--- a/gcc/gencheck.c
+++ b/gcc/gencheck.c
@@ -61,7 +61,7 @@ int main (argc, argv)
return 0;
}
-#if defined(USE_C_ALLOCA) && !defined(__GNUC__)
+#if defined(USE_C_ALLOCA)
/* 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) */
@@ -73,10 +73,11 @@ xmalloc (nbytes)
if (!tmp)
{
- fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
+ fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
+ nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
-#endif /* USE_C_ALLOCA && !__GNUC__ */
+#endif /* USE_C_ALLOCA */
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c
index ade07ff4b6c..73eb39d7963 100644
--- a/gcc/gengenrtl.c
+++ b/gcc/gengenrtl.c
@@ -22,10 +22,6 @@ Boston, MA 02111-1307, USA. */
#include "hconfig.h"
#include "system.h"
-#include "obstack.h"
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free free
-
#define NO_GENRTL_H
#include "rtl.h"
@@ -284,7 +280,7 @@ gencode (f)
gendef (f, *fmt);
}
-#if defined(USE_C_ALLOCA) && !defined(__GNUC__)
+#if defined(USE_C_ALLOCA)
char *
xmalloc (nbytes)
int nbytes;
@@ -293,13 +289,14 @@ xmalloc (nbytes)
if (!tmp)
{
- fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
+ fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
+ nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
-#endif /* USE_C_ALLOCA && !__GNUC__ */
+#endif /* USE_C_ALLOCA */
int
main(argc, argv)