[cfe-dev] builtin_malloc missing

reed kotler rkotler at mips.com
Wed Oct 2 11:37:34 PDT 2013


filed bug http://llvm.org/bugs/show_bug.cgi?id=17439


kotler at mipssw006:~/rt-rk-4doug/tmp$ ~/llvmw/install/bin/clang 20071018-1.c
20071018-1.c:14:8: error: use of unknown builtin '__builtin_malloc'
       [-Wimplicit-function-declaration]
   *f = __builtin_malloc(sizeof(struct foo));
        ^
20071018-1.c:14:6: warning: incompatible integer to pointer conversion
       assigning to 'struct foo *' from 'int' [-Wint-conversion]
   *f = __builtin_malloc(sizeof(struct foo));
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20071018-1.c:18:9: warning: incompatible integer to pointer conversion
       initializing 'void *' with an expression of type 'int' 
[-Wint-conversion]
   void *x = __builtin_malloc(sizeof(struct mem));
         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131002/478788e6/attachment.html>


More information about the cfe-dev mailing list