提交 d71d0805 编写于 作者: R Rich Felker

alloca cannot be a function. #define it to the gcc builtin if possible

gcc makes this mapping by default anyway, but it will be disabled by
-fno-builtin (and presumably by -std=c99 or similar). for the main
program the error will be reported by the linker, and the issue can
easily be fixed, but for dynamic-loaded so files, the error cannot be
detected until dlopen time, at which point it has become very obscure.
上级 5bd0ab8a
......@@ -10,6 +10,10 @@ extern "C" {
void *alloca(size_t);
#ifdef __GNUC__
#define alloca __builtin_alloca
#endif
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册