Ian Lynagh wrote:
On Wed, Sep 17, 2008 at 02:23:20PM +0200, David Markvica wrote:
Simon Marlow wrote:
Manuel M T Chakravarty wrote:
On Mac OS X 10.5, I am getting the appended warnings that break validate (since yesterday).
It seems that for some odd reason Apple's gcc (versions 4.0.1 and 4.2.1)
defines __GNUC_GNU_INLINE__ but doesn't actually support
__attribute__((gnu_inline)).
FSF's gcc added the macro together with the attribute in their version
4.1.3.

According to [1], this seems to be an acceptable workaround:

HEAD validates for me both with and without your workaround. I have:

$ gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)

Won't the workaround break when Apple ships gcc 4.3?

Yes, it would break if a future Apple gcc follows the standard gcc in this regard. So for that reason I propose we use

#if defined(__GNUC_GNU_INLINE__) && !defined(__APPLE__)
#  if defined(KEEP_INLINES)
#    define EXTERN_INLINE inline
#  else
#    define EXTERN_INLINE extern inline __attribute__((gnu_inline))
#  endif
#else
#  if defined(KEEP_INLINES)
#    define EXTERN_INLINE
#  else
#    define EXTERN_INLINE INLINE_HEADER
#  endif
#endif

on the grounds that the !__GNUC_GNU_INLINE__ case is perfectly safe to use, except that it might end up duplicating a little code. This will be safe even if Apple changes their mind in the future. Could someone try this version?

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to