gcc4: extern inline vs. c99

Dave Korn dave.korn.cygwin@googlemail.com
Thu Mar 26 04:18:00 GMT 2009


Yaakov (Cygwin/X) wrote:

> gcc-4 -std=c99 appears to be treating extern inline functions as if they
> were marked dllexport, leading to all sorts of linking problems.  STC:

  Hi Yaakov,

  This is nothing to do with dllexport, as it happens.  The semantics of
"extern inline" have changed in recent GCC to align with the C99 standard.
The old "extern inline" semantics were a GNU extension, and in relying on it,
the netinet.h header is probably being not strictly ANSI compliant.  It needs
fixing up so that it knows what kind of inline to use according to the
language standard in effect.  Fortunately GCC provides us with the predefined
preprocessor macro '__GNUC_STDC_INLINE__' to let us know when the new
behaviour is in effect.

  See also http://gcc.gnu.org/ml/gcc/2007-03/threads.html#01088 for background
and a solution.

    cheers,
      DaveK






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list