bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inline related build failures on MacOS X 10.5


From: Ludovic Courtès
Subject: Re: inline related build failures on MacOS X 10.5
Date: Fri, 11 Apr 2008 16:33:43 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

Bruno Haible <address@hidden> writes:

>   $ gcc -v 2>&1 | tail -1
>   gcc version 4.0.1 (Apple Inc. build 5465)
>
> It appears to be a GCC 4.0.x with some backports from the GCC 4.2 and 4.3
> development.
>
> For 'extern inline', this gcc generates a symbol with global visibility in
> "gcc -std=gnu99" mode, but not in the default mode. The macro that allows to
> distinguish the two cases is '#define __STDC_VERSION__ 199901L' in the
> "gcc -std=gnu99" mode, not defined in the default mode.
>
> Instead of 'extern inline', one cannot use
> 'extern inline __attribute__ ((__gnu_inline__))'
> because that yields warnings:
>   argp-fmtstream.h:231: warning: '__gnu_inline__' attribute directive ignored
> But one can use 'inline'. I.e. __GNUC_STDC_INLINE__ should be defined but
> isn't.

FWIW, I solved it this way in Guile, based on what GNU R does:

  
http://git.sv.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=7dc9ae7179b8b099897f8080b675e2a9c54d388c

This is the very issue Simon mentioned here yesterday or so.

Of course, not compiling in C99 mode solves the problem, and that would
be a reasonable choice since most GNU projects that aim at maximum
portability don't rely on C99 language features.

Thanks,
Ludovic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]