This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __builtin_* expansion to outcalls vs name space issues


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]