diff options
author | Richard Henderson <rth@cygnus.com> | 1997-08-27 16:50:04 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1997-08-27 16:50:04 -0700 |
commit | ba64ca335ac54ab2d94ffe4058b2d6415910c10e (patch) | |
tree | 8a1b05f4e87d638c91e8454cce5d519861266768 | |
parent | 7818d6fcb22797889608886779b16f46a0de60df (diff) | |
download | gcc-ba64ca335ac54ab2d94ffe4058b2d6415910c10e.zip gcc-ba64ca335ac54ab2d94ffe4058b2d6415910c10e.tar.gz gcc-ba64ca335ac54ab2d94ffe4058b2d6415910c10e.tar.bz2 |
Patch from Richard Henderson to fix alpha-linux alloca redefinition problems.
* alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC
if not already defined, and USE_C_ALLOCA not defined.
From-SVN: r14977
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/alpha/xm-alpha.h | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d5d718..81a208a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 27 16:35:29 1997 Richard Henderson <rth@cygnus.com> + + * alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC + if not already defined, and USE_C_ALLOCA not defined. + Wed Aug 27 16:08:43 1997 Jim Wilson <wilson@cygnus.com> * config.guess: Replace with script that uses ../config.guess. diff --git a/gcc/config/alpha/xm-alpha.h b/gcc/config/alpha/xm-alpha.h index 642e1cf..2cf8917 100644 --- a/gcc/config/alpha/xm-alpha.h +++ b/gcc/config/alpha/xm-alpha.h @@ -41,12 +41,18 @@ Boston, MA 02111-1307, USA. */ #define SUCCESS_EXIT_CODE 0 #define FATAL_EXIT_CODE 33 -/* If not compiled with GNU C, use the builtin alloca. */ -#if !defined(__GNUC__) && !defined(_WIN32) +/* If compiled with GNU C, use the builtin alloca. */ +#ifndef alloca +#if defined(__GNUC__) && !defined(USE_C_ALLOCA) +#define alloca __builtin_alloca +#else +#if !defined(_WIN32) && !defined(USE_C_ALLOCA) #include <alloca.h> #else extern void *alloca (); #endif +#endif +#endif /* The host compiler has problems with enum bitfields since it makes them signed so we can't fit all our codes in. */ |