supported gcc versions (was [PATCH:libXmu] Use _X_ATTRIBUTE_PRINTF from Xfuncproto.h in Xmu headers)
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Jun 9 13:20:41 PDT 2010
Jamey Sharp wrote:
> 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.
That sounds like we could almost just call it #ifdef __GNUC__ then.
The oldest gcc version I remember us claiming to support in X.Org
was 2.95, since that's what one of the BSD's was using (and possibly
a previous RHEL?). From the Solaris point of view, the oldest I
care about is 3.4.3, since that's what's in Solaris 10. (OpenSolaris
still defaults to 3.4.3, but offers 4.3.2 as an option.)
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list