]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: use __builtin_alloca for alloca on vxworks
authorAlexandre Oliva <oliva@adacore.com>
Tue, 13 May 2025 02:23:14 +0000 (23:23 -0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 1 Jul 2025 08:29:42 +0000 (10:29 +0200)
Several adaint.c functions call alloca, but vxworks doesn't declare
it.  Use the GCC builtin.

gcc/ada/ChangeLog:

* adaint.c [__vxworks] (alloca): Redirect to builtin.

gcc/ada/adaint.c

index 2f5bbf31f799d1d622ca1e90461abddb45e99fc5..adc39517280a8120359a24bd816a80ba49d72237 100644 (file)
 #include <sys/time.h>
 #include <ctype.h> /* for isalpha */
 
+#ifndef alloca
+#define alloca(n) __builtin_alloca(n)
+#endif
+
 #if defined (__mips_vxworks)
 #include "cacheLib.h"
 #endif /* __mips_vxworks */