This is the mail archive of the
mailing list for the GCC project.
Re: [libitm,PATCH] Fix bootstrap due to __always_inline in libitm
On 04/01/2013 02:00 AM, Gerald Pfeifer wrote:
First blush it seems to me that we should consistently use ALWAYS_INLINE
in this file too.
Andi's patch broke bootstrap on all FreeBSD platforms, which took me
a bit to realize since he did not update the ChangeLog:
2013-03-23 Andi Kleen <email@example.com>
* local_atomic (__always_inline): Add.
atomic_signal_fence, test_and_set, clear, store, load,
exchange, compare_exchange_weak, compare_exchange_strong,
fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
Add __always_inline to force inlining.
The problem is the he added the following to local_atomic
#define __always_inline inline __attribute__((always_inline))
whereas /usr/include/sys/cdefs.h on FreeBSD has the following
#define __always_inline __attribute__((__always_inline__))
and hence misses the inline (plus libitm/common.h already has
ALWAYS_INLINE for that purpose).
I am fixing this by adding an explicit inline to those cases where
necessary. I did not add it to struct members, which are considered
inline by default (and believe Andi's patch may have been a bit over-
eager from that perspective).
But not that inline isn't the same as always_inline...