diff --git a/gcc/config/i386/xm-aix.h b/gcc/config/i386/xm-aix.h index e3e673972c3..d434a53e923 100644 --- a/gcc/config/i386/xm-aix.h +++ b/gcc/config/i386/xm-aix.h @@ -49,6 +49,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define bzero(a,b) memset (a,0,b) #define bcmp(a,b,c) memcmp (a,b,c) +/* If compiled with GNU C, use the built-in alloca. */ +#undef alloca #ifdef __GNUC__ -#define alloca(n) __builtin_alloca(n) +#define alloca __builtin_alloca +#else +#define USE_C_ALLOCA #endif diff --git a/gcc/config/i386/xm-sysv4.h b/gcc/config/i386/xm-sysv4.h index 955c42d7741..6aa397c6b32 100644 --- a/gcc/config/i386/xm-sysv4.h +++ b/gcc/config/i386/xm-sysv4.h @@ -2,3 +2,11 @@ #include "xm-i386.h" #include "xm-svr4.h" + +/* If compiled with GNU C, use the built-in alloca. */ +#undef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else +#define USE_C_ALLOCA +#endif