[PATCH libXi] fix build with gcc 2.95

Mark Kettenis mark.kettenis at xs4all.nl
Fri Aug 27 02:49:44 PDT 2010


> From: Fernando Carrijo <fcarrijo.lists at gmail.com>
> Date: Thu, 26 Aug 2010 21:01:32 -0300
> 
> Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 
> > On Thu, Aug 26, 2010 at 08:37:57AM +0200, Matthieu Herrb wrote:
> > > On Wed, Aug 25, 2010 at 05:53:01PM -0400, Matt Turner wrote:
> > > > 
> > > > Looks like a sufficiently trivial change, but what system still using
> > > > gcc 2.95 does anyone care about running modern X.Org on?
> > > > 
> > > 
> > > I have to repeat this every time I send a patch for gcc 2.95... :) 
> > 
> > you could add it to the wiki and then shout at them for not RTFW :)
> > 
> > on that note, didn't we have a wiki page that lists the required compiler
> > features? Can't seem to find it anymore.
> 
> Besides the obvious documentation...
> 
>   http://www.x.org/wiki/ModularDevelopersGuide#Minimumrequirements
> 
> I also remember this one...
> 
>   http://cgit.freedesktop.org/xorg/xserver/tree/doc/c-extensions
> 
> which is not in the wiki, though.

Hmm, so the first one says:

  An ISO/ANSI C89 compliant C compiler & libc

    * For example, gcc 2.95 or newer, and glibc 2.2.4 or newer

But the second one has:

  Mandatory extensions:

    * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); }

Which is a C99 feature that gcc 2.95 doesn't offer (I believe it does
offer the other "Mandatory" extensions listed on that page).  Many C
programmers (including myself) actually consider interleaving code and
declarations to be bad style, and a C99 misfeature.

Since the Xserver compiles with gcc 2.95, this extension isn't
actually mandatory.  So can this be removed from the list of mandatory
extensions?

I do realize that most developers use a C99 compiler for development
and that declarations in the middle of code may slip in accidentally.
That's OK; they'll be fixed eventually.


More information about the xorg-devel mailing list