builderror xorg-server-1.11.4 with gcc-4.7.0

Stephan Raue mailinglists at openelec.tv
Thu Mar 29 17:53:30 PDT 2012


its similiar to https://bugs.gentoo.org/show_bug.cgi?id=402285 :

using -O2 instead -O3 solves the build problem.

Stephan

Am 29.03.2012 22:04, schrieb Alan Coopersmith:
> On 03/29/12 12:41 PM, Stephan Raue wrote:
>> Hi,
>>
>> building xorg-server-1.11.4 with gcc-4.7.0 gives me follow error:
>>
>>
>> main.c: In function 'main':
>> main.c:138:13: warning: assignment discards 'const' qualifier from pointer
>> target type [enabled by default]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> main.c:171:10: error: array subscript is outside array bounds
>> [-Werror=array-bounds]
>> cc1: some warnings being treated as errors
> Seems like a bug in your brand new compiler, since the code appears correct.
>
> http://cgit.freedesktop.org/xorg/xserver/tree/dix/main.c?id=xorg-server-1.11.4#n167
>
> shows the code in question is:
>
> 	    for (i=1; i<MAXCLIENTS; i++)
> 		clients[i] = NullClient;
>
> and include/dix.h defines that array as:
>
> extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
>




More information about the xorg mailing list