xproto: _X_NONNULL uses GNU extension

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jan 9 15:26:24 PST 2015


On 01/ 9/15 02:53 PM, Thomas Klausner wrote:
> Hi!
>
> When compiling slock with clang, one sees:
>
> /scratch/x11/slock/work/.buildlink/include/X11/Xfuncproto.h:157:24: warning: named variadic macros are a GNU extension [-Wvariadic-macros]
> #define _X_NONNULL(args...)  __attribute__((nonnull(args)))
>
> Is there a way to define this without using GNU extensions?

You could use C99 varargs macros like the non-#if __GNUC__ case does,
we just never bothered making the __GNUC__ version portable to non-gcc
compilers, since why lie and say you're gcc compatible if you're not?

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list