tsystem.h (alloca): Provide a default definition.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 20 Sep 2004 22:23:12 +0000 (22:23 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 20 Sep 2004 22:23:12 +0000 (22:23 +0000)
* tsystem.h (alloca): Provide a default definition.

Revert:
2001-08-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
    * unwind-dw2.c: Call __builtin_alloca, not alloca.

From-SVN: r87775

gcc/ChangeLog
gcc/tsystem.h
gcc/unwind-dw2.c

index 40b125ead44c7b671c3ae4209c8e107f3657e392..919059442c840ddce531829b38798828314141a3 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * tsystem.h (alloca): Provide a default definition.
+
+       Revert:
+       2001-08-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+           * unwind-dw2.c: Call __builtin_alloca, not alloca.
+
 2004-09-20  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR tree-opt/17558
index 7928b31b68a3501f308afab07dca65b476406cf7..7ccdf4c0f593e622c652703069c95f940a225b2c 100644 (file)
@@ -117,4 +117,8 @@ extern int errno;
 #define NULL 0
 #endif
 
+/* GCC always provides __builtin_alloca(x).  */
+#undef alloca
+#define alloca(x) __builtin_alloca(x)
+
 #endif /* ! GCC_TSYSTEM_H */
index eb36e207e2ff9068c744942595f9962c078e191f..67b8d1cd0661e955b1fe9be7d115c37161ed85a9 100644 (file)
@@ -840,7 +840,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
                unused_rs = unused_rs->prev;
              }
            else
-             new_rs = __builtin_alloca (sizeof (struct frame_state_reg_info));
+             new_rs = alloca (sizeof (struct frame_state_reg_info));
 
            *new_rs = fs->regs;
            fs->regs.prev = new_rs;