Mail Archives: djgpp/1997/07/09/11:34:31
On Tue, 8 Jul 1997, Nate Eldredge wrote:
>
> >> And lastly, does memcpy, memmove, memset and so on, alter memory dwords
> >
> >Depends on the function and the paramteters. Sometimes they are
> >function calls (the code in libc is well optimised) and athers, they are
> >inlined and the implementation is dependent on the size of the transfer.
>
> That bothers me slightly. It seems that certain functions such as strcpy,
> memset, etc, are magically known about by the compiler (it refers to them as
> builtin functions). This means I can't put a strcpy of my own in the program
> unless it goes in the same source file; otherwise GCC will inline its own.
Just add the -fno-builtin flag to the compile and the compiler will not
translate any builtin functions to inline code unless they start with an
underscore. Such builtins include: `abort', `abs', `alloca', `cos',
`exit', `fabs', `ffs', `labs', `memcmp', `memcpy', `sin', `sqrt',
`strcmp', `strcpy', and `strlen'.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -