[PATCH:xscope 04/24] Convert some for loops to use C99-style inline variable declarations

Mark Kettenis mark.kettenis at xs4all.nl
Mon Sep 3 13:39:31 PDT 2012


> Date: Sat, 01 Sep 2012 10:21:14 -0700
> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> 
> On 09/ 1/12 03:33 AM, Mark Kettenis wrote:
> >> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> >> Date: Fri, 31 Aug 2012 22:17:46 -0700
> > 
> > Please don't do this.  Some OpenBSD platforms are still stuck with GCC
> > 2.95.3.  GCC 2.95.3 is almost a C99 compiler, but doesn't support the
> > C99 (mis)feature of allowing variable declarations after statements.
> > That's always been a controversial feature, although using it to
> > declare loop variables inside a for statement like you're doing here
> > is fairly widely accepted.
> 
> I admit part of my intent with this patch was finding out if it would cause
> problems in X.Org code, in a much less critical area than the core X server.

I guessed as much.  Which is why I actually responded to this be, even
though we don't currently ship xscope on OpenBSD as Matthieu pointed
out.

> We're not going to stay gcc 2.95 compatible forever, especially
> since few of the rest of us have copies handy to check which subsets
> it was compatible with - it's just a question of how long.

I'm certainly not expecting other folks to test compatibility with gcc
2.95.  That burden should lie firmly on the people who care about it.
All I'm asking is that people don't try to actively break things for
us and that patches to fix any problems would still be accepted.

> Is work happening on moving to another compiler such as clang? 

No.  The most important reason to stick with gcc 2.95 is that it is
fast and doesn't need a lot of memory.

> Is every software package in the open source universe holding back for
> these platforms?

No.  But we consider X to be an essential part of the system.

I hope you don't mind that I won't repond to Daniel's somewhat
childish remarks.

Cheers,

Mark



More information about the xorg-devel mailing list