This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #16907] Do not disable __attribute__ when you include argp.h
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: OndÅej BÃlka <neleai at seznam dot cz>, Will Newton <will dot newton at linaro dot org>
- Cc: aurelien at aurel32 dot net, libc-alpha <libc-alpha at sourceware dot org>, bug-gnulib at gnu dot org
- Date: Fri, 23 May 2014 07:53:11 -0700
- Subject: Re: [PATCH][BZ #16907] Do not disable __attribute__ when you include argp.h
- Authentication-results: sourceware.org; auth=none
- References: <20140518125743 dot GA11620 at domone dot podge> <CANu=Dmjb+Zwup9m7r4EXWx+VFO4HYDC1ifW08AQKjtJ0P4UUhA at mail dot gmail dot com> <20140523100038 dot GA15258 at domone dot podge>
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.