[LLVMdev] Linking strncpy
Reid Spencer
reid at x10sys.com
Thu Apr 15 00:34:02 PDT 2004
On Wed, 2004-04-14 at 22:16, Chris Lattner wrote:
> 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
I would suspect (and this is only a guess) that GCC would warn on
builtins that it doesn't actually generate a function for.
memcpy/memmove fall into this category on processors like i86 because
there are simple instructions to essentially do the copy/move. Even
though the function may be declared and even implemented somewhere in a
header file, it probably singles a few of them out for direct code
implementation rather than function call?
Just a guess.
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/20040415/4e7d60b5/attachment.sig>
More information about the llvm-dev
mailing list