Ondřej Bílka wrote:
CCing gnulib. Could this be backported also there or do you have
different solution?
We solved this problem in a different way years ago, using something
like this:
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 7)
# define _GL_ATTRIBUTE_FORMAT(s) __attribute__ ((__format__ s))
#else
# define _GL_ATTRIBUTE_FORMAT(s)
#endif
and then using _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3)) later, instead
of __attribute__ ((__format__ (__printf__, 2, 3))). Presumably glibc
could do something similar. Glibc could use a different name; that's
all right, gnulib will just switch to the name that glibc uses.