Validate broken

Simon Marlow marlowsd at gmail.com
Wed Sep 17 06:00:03 EDT 2008


Manuel M T Chakravarty wrote:
> On Mac OS X 10.5, I am getting the appended warnings that break validate 
> (since yesterday).
> 
> Manuel
> 
> -=-
> 
> gcc -o mkGHCConstants.o -Werror -DTABLES_NEXT_TO_CODE -I. -I../rts 
> -I../gmp/gmpbuild    -c mkDerivedConstants.c  -DGEN_HASKELL
> gcc -Werror -DTABLES_NEXT_TO_CODE -I. -I../rts -I../gmp/gmpbuild    -c 
> mkDerivedConstants.c -o mkDerivedConstants.o
> ../utils/mkdependC/mkdependC -f .depend     -- -Werror 
> -DTABLES_NEXT_TO_CODE -I. -I../rts -I../gmp/gmpbuild    -- 
> mkDerivedConstants.c shell-tools.c
> cc1: warnings being treated as errors
> In file included from Stg.h:216,
>                  from Rts.h:19,
>                  from mkDerivedConstants.c:23:
> SMP.h:44: warning: 'gnu_inline' attribute directive ignoredcc1: warnings 
> being treated as errors

I'm not able to repeat this with the versions of gcc I have installed, and 
from reading the gcc docs it seems I'm doing the right thing.

Here is the code:

// The special "extern inline" behaviour is now only supported by gcc
// when _GNUC_GNU_INLINE__ is defined, and you have to use
// __attribute__((gnu_inline)).  So when we don't have this, we use
// ordinary static inline.
//
#if defined(__GNUC_GNU_INLINE__)
#  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

So we only use the attribute gnu_inline when __GNUC_GNU_INLINE__ is 
defined, which according to the gcc docs is correct.

Can someone with a Mac figure out what's going wrong here, and what test we 
should use?

Cheers,
	Simon



More information about the Cvs-ghc mailing list