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/
> 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... :( > > -ChrisThat's weird. Perhaps GCC knows about its own builtin functions and the prototypes for them so that if you declare a similar function with the wrong prototype you get the warning? Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040414/770f81f3/attachment.sig>
On Wed, 14 Apr 2004, Reid Spencer wrote:> > > 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 > > That's weird. Perhaps GCC knows about its own builtin functions and the > prototypes for them so that if you declare a similar function with the > wrong prototype you get the warning?But it only gives warnings for SOME builtins. :) Perhaps -fno-builtins will silence the warning. *shrug* -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/