Eric Blake wrote: > +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) > +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ > +# define _GL_WARN_ON_USE(function, message) \ > +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) > + > +# else /* Unsupported. */ > +# define _GL_WARN_ON_USE(function, message) \ > +typedef int _gl_warn_on_use
In ANSI C, but not in C99, it is an error to typedef the same type twice: typedef int _gl_warn_on_use; typedef int _gl_warn_on_use; Therefore the last line is better changed to 'extern int _gl_warn_on_use'. Actually one might consider to move the semicolon that terminates the declaration into the expansion of _GL_WARN_ON_USE. Then, in the unsupported case, the expansion of _GL_WARN_ON_USE(function, message) can be empty. Bruno
