mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] Unconditonally define alloca as __builtin_alloca
@ 2019-11-19  4:04 Michael Forney
  2019-11-19  9:28 ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Forney @ 2019-11-19  4:04 UTC (permalink / raw)
  To: musl

This enables alternative compilers, which may not define __GNUC__,
to implement alloca, which is still fairly widely used.

This is similar to how stdarg.h already works in musl; compilers must
implement __builtin_va_arg, there is no fallback definition.
---
 include/alloca.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/alloca.h b/include/alloca.h
index d2e6f1c6..8ae8a30d 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -8,11 +8,7 @@ extern "C" {
 #define	__NEED_size_t
 #include <bits/alltypes.h>
 
-void *alloca(size_t);
-
-#ifdef __GNUC__
 #define alloca __builtin_alloca
-#endif
 
 #ifdef __cplusplus
 }
-- 
2.20.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-01 20:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19  4:04 [PATCH] Unconditonally define alloca as __builtin_alloca Michael Forney
2019-11-19  9:28 ` Szabolcs Nagy
2019-11-19  9:56   ` [PATCH v2] " Michael Forney
2020-01-01 20:02     ` Michael Forney
2020-01-01 20:08       ` Rich Felker
2020-01-01 20:28         ` Michael Forney

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).