Re: Inline C functions in Xcode 3
Re: Inline C functions in Xcode 3
- Subject: Re: Inline C functions in Xcode 3
- From: Steve Checkoway <email@hidden>
- Date: Sat, 3 Nov 2007 15:21:06 -0700
On Nov 3, 2007, at 1:59 PM, Eric Albert wrote:
I'd strongly advise against using either FOUNDATION_STATIC_INLINE or
CF_INLINE. Neither is supported for anything other than Foundation
or CF's uses. They may work for you, but the Foundation and CF
engineers may change them at any point.
Speaking of inline, what is the difference (if any) between __inline,
__inline__, and __attribute__((always_inline))? Looking at the
definitions of CF_INLINE, I see:
#if defined(__GNUC__) && (__GNUC__ == 4) && !defined(DEBUG)
#define CF_INLINE static __inline__
__attribute__((always_inline))
#elif defined(__GNUC__)
#define CF_INLINE static __inline__
#elif defined(__MWERKS__) || defined(__cplusplus)
#define CF_INLINE static inline
#elif defined(_MSC_VER)
#define CF_INLINE static __inline
#elif defined(__WIN32__)
#define CF_INLINE static __inline__
#endif
Why this header using __inline__ __attribute__((always_inline)) for
gcc 4.x?
Both C++98 and C99 include an inline keyword and they seem to be about
the same--as opposed to how gcc, at least, treats inline in C89 vs.
C99. Is there a reason to use __inline or __inline__ (both of which do
work with gcc) instead of inline?
I know these questions aren't really appropriate for Xcode-users and I
apologize, but there is still no more appropriate list. (I filed a bug
a year ago requesting the creation of such a list but was told that
that was the wrong place to do so but that my feedback had been
forwarded to "the appropriate group for review & consideration.")
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden