This is probably an old issue but why no builtin_malloc ../tests-c/20071018-1.c:14:8: error: use of unknown builtin '__builtin_malloc' [-Wimplicit-function-declaration] *f = __builtin_malloc(sizeof(struct foo));
Both of your questions are clang questions, you should ask on cfe-dev. -Chris On Oct 1, 2013, at 8:26 PM, reed kotler <rkotler at mips.com> wrote:> This is probably an old issue but why no builtin_malloc > > ../tests-c/20071018-1.c:14:8: error: use of unknown builtin '__builtin_malloc' > [-Wimplicit-function-declaration] > *f = __builtin_malloc(sizeof(struct foo)); > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 10/02/2013 10:36 AM, Chris Lattner wrote:> Both of your questions are clang questions, you should ask on cfe-dev. > > -ChrisGood point. I'm going to just file them as bugs. I have some other builtin issues I've found. Reed> On Oct 1, 2013, at 8:26 PM, reed kotler <rkotler at mips.com> wrote: > >> This is probably an old issue but why no builtin_malloc >> >> ../tests-c/20071018-1.c:14:8: error: use of unknown builtin '__builtin_malloc' >> [-Wimplicit-function-declaration] >> *f = __builtin_malloc(sizeof(struct foo)); >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Tue, Oct 01, 2013 at 08:26:22PM -0700, reed kotler wrote:> This is probably an old issue but why no builtin_mallocIt's a library function. It will always be a library function, even if the compiler can optimise it away in some cases. It makes no sense to provide it as externally visible builtin. Joerg