[PATCH:libXmu] Use _X_ATTRIBUTE_PRINTF from Xfuncproto.h in Xmu headers
Jamey Sharp
jamey at minilop.net
Wed Jun 9 13:08:48 PDT 2010
On Wed, Jun 9, 2010 at 1:01 PM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> Alan Coopersmith wrote:
>> -#if defined(__GNUC__) && \
>> - ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
>> -__attribute((format(printf,3,4)))
>
> BTW, one thing I've noticed, but will leave fixing up to someone with more gcc
> versions around to test with - Xmu was using that for gcc >= 2.4, but for some
> reason Xfuncproto.h limits it to gcc >= 4.0.
The "format" attribute was apparently documented for GCC at least as
far back as 2.3.3:
http://www.ohse.de/uwe/articles/gcc-attributes.html#func-format
That's a useful reference for historic versions of all of GCC's
attributes, although it doesn't cover anything newer than 3.4.
Jamey
More information about the xorg-devel
mailing list