[LLVMdev] Linking strncpy
Chris Lattner
sabre at nondot.org
Wed Apr 14 22:59:02 PDT 2004
On Wed, 14 Apr 2004, Reid Spencer wrote:
> On Wed, 2004-04-14 at 20:35, Chris Lattner wrote:
>
> > The problem is that the code generated by the C backend cannot include any
> > system headers. If the system header were to have a #define (not a rare
> > occurance) the header could arbitrarily change the CBE code in BAAD ways.
> > :(
>
> I was thinking of Eric doing something like:
>
> myfile.c:
> #include <string.h>
> #include "cbe_generated_file.c"
>
> Although, why he would eludes me.
You don't need to do this to get those annoying GCC warnings. They come
out whenever you compile a C program produced by the LLVM CBE that uses
certain GCC "builtins", like memcpy... :(
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list