This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #16907] Do not disable __attribute__ when you include argp.h


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]