__builtin_* expansion to outcalls vs name space issues
Joseph S. Myers
joseph@codesourcery.com
Tue Feb 5 23:31:00 GMT 2013
On Tue, 5 Feb 2013, Roland McGrath wrote:
> What should be the expectation of responsibility here? On the one hand,
> it seems vaguely reasonable that __builtin_foobar degenerates to calling
> foobar.
Yes, that's expected. (There is however a known GCC bug where calls may
be generated to functions that aren't reserved and without a corresponding
__builtin_* call: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46926>.
But it's always expected that not all __builtin_* calls are expanded
inline.)
> So, are we wrong for using __builtin_mempcpy in a place where a call to
> mempcpy is not kosher?
Yes. Declaring mempcpy with __asm__ ("__mempcpy") should cause
__builtin_mempcpy to generate a call to __mempcpy.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list