[LLVMdev] Linking strncpy

Chris Lattner sabre at nondot.org
Wed Apr 14 22:29:01 PDT 2004


On Wed, 14 Apr 2004, Eric Zimmerman wrote:

> Chris,
>
> I'm fine with using JIT, but I'm trying to understand this problem:
> 1. My LLVM program does not produce correct results

How are you running it when it does not produce correct results?  The
interpreter (lli -force-interpreter) will not work with strncpy.

> 2. Using llvm-dis, I disassemble the bytecode to C
> 3. I recompile using GCC and the program _works correctly_.

So it works with the C backend, but not with which code generator?

> The only odd thing is when I recompile with GCC, I see these messages:
>
> pal3.c:195: warning: conflicting types for built-in function `strcmp'
> pal3.c:200: warning: conflicting types for built-in function `memcpy'
> pal3.c:202: warning: conflicting types for built-in function `strncpy'
> Do you have any insight into what's happening?  Thanks,

These warnings can be ignored.  I don't know of any way to make GCC be
quiet about them.  :)

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list