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

Alan Coopersmith alan.coopersmith at oracle.com
Sat Sep 1 10:21:14 PDT 2012


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 do wonder though about the viability of updating some parts of your system
to 2012 releases while keeping others stuck at a 2001 release.   I certainly
don't try to build current X.Org releases on Solaris 8 with our Studio 8
compilers and wouldn't expect anyone else to put in effort to do so.

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.   Is work happening on moving to another
compiler such as clang?   Is every software package in the open source universe
holding back for these platforms?   Or are they just being increasingly deprecated?

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list