builderror xorg-server-1.11.4 with gcc-4.7.0

2012-03-29 Thread Stephan Raue

Hi,

building xorg-server-1.11.4 with gcc-4.7.0 gives me follow error:


libtool: compile:  
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/bin/x86_64-openelec-linux-gnu-gcc 
-std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I../include 
-DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations 
-Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
-Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement 
-Wunused -Wuninitialized -Wshadow -Wcast-qual -Wmissing-noreturn 
-Wmissing-format-attribute -Wredundant-decls -Werror=implicit 
-Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces 
-Werror=sequence-point -Werror=return-type -Werror=trigraphs 
-Werror=array-bounds -Werror=write-strings -Werror=address 
-Werror=int-to-pointer-cast -Werror=pointer-to-int-cast 
-fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT 
-I/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/pixman-1 
-I/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/freetype2 
-I../include -I../include -I../Xext -I../composite -I../damageext 
-I../xfixes -I../Xi -I../mi -I../miext/sync -I../miext/shadow 
-I../miext/damage -I../render -I../randr -I../fb -fvisibility=hidden 
-march=btver1 -m64 -fomit-frame-pointer -Wall -pipe -O3 
-fexcess-precision=fast -ffast-math -MT main.lo -MD -MP -MF 
.deps/main.Tpo -c main.c  -fPIC -DPIC -o .libs/main.o

In file included from ../include/privates.h:145:0,
 from ../include/cursor.h:54,
 from ../include/scrnintstr.h:54,
 from main.c:86:
../include/dix.h:532:51: warning: redundant redeclaration of 'ffs' 
[-Wredundant-decls]

In file included from main.c:103:0:
../include/dixfont.h:149:51: warning: redundant redeclaration of 
'client_auth_generation' [-Wredundant-decls]
In file included from 
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontstruct.h:291:0,

 from ../include/dixfont.h:30,
 from main.c:103:
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontproto.h:52:12: 
note: previous declaration of 'client_auth_generation' was here

In file included from main.c:103:0:
../include/dixfont.h:151:52: warning: redundant redeclaration of 
'DeleteFontClientID' [-Wredundant-decls]
In file included from 
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontstruct.h:291:0,

 from ../include/dixfont.h:30,
 from main.c:103:
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontproto.h:59:13: 
note: previous declaration of 'DeleteFontClientID' was here

In file included from main.c:103:0:
../include/dixfont.h:153:65: warning: redundant redeclaration of 
'GetClientResolutions' [-Wredundant-decls]

In file included from main.c:98:0:
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/font.h:147:26: 
note: previous declaration of 'GetClientResolutions' was here

In file included from main.c:103:0:
../include/dixfont.h:155:51: warning: redundant redeclaration of 
'GetDefaultPointSize' [-Wredundant-decls]
In file included from 
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontstruct.h:291:0,

 from ../include/dixfont.h:30,
 from main.c:103:
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontproto.h:44:12: 
note: previous declaration of 'GetDefaultPointSize' was here

In file included from main.c:103:0:
../include/dixfont.h:157:52: warning: redundant redeclaration of 
'GetNewFontClientID' [-Wredundant-decls]
In file included from 
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontstruct.h:291:0,

 from ../include/dixfont.h:30,
 from main.c:103:
/home/stephan/projects/openelec-master/build.OpenELEC_PVR-Fusion.x86_64-devel/toolchain/x86_64-openelec-linux-gnu/sysroot/usr/include/X11/fonts/fontproto.h:60:13: 
note: previous declaration of 'GetNewFontClientID' was here

In file included from main.c:103:0:
../include/dixfont.h:159:51: warning: redundant redeclaration of 
'init_fs_handlers' [-Wredundant-decls]
In file included from 

Re: builderror xorg-server-1.11.4 with gcc-4.7.0

2012-03-29 Thread 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; iMAXCLIENTS; i++)
clients[i] = NullClient;

and include/dix.h defines that array as:

extern _X_EXPORT ClientPtr clients[MAXCLIENTS];

-- 
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: builderror xorg-server-1.11.4 with gcc-4.7.0

2012-03-29 Thread Stephan Raue

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; iMAXCLIENTS; i++)
clients[i] = NullClient;

and include/dix.h defines that array as:

extern _X_EXPORT ClientPtr clients[MAXCLIENTS];



___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: builderror xorg-server-1.11.4 with gcc-4.7.0

2012-03-29 Thread Alan Coopersmith
On 03/29/12 05:53 PM, Stephan Raue wrote:
 its similiar to https://bugs.gentoo.org/show_bug.cgi?id=402285 :

No, that was a bug in the code.

 using -O2 instead -O3 solves the build problem.

Still sounding like a bug in the compiler, until you can explain how the
code is wrong, since I can't see a bug on our side.

-- 
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: builderror xorg-server-1.11.4 with gcc-4.7.0

2012-03-29 Thread Eirik Byrkjeflot Anonsen
Sérgio Basto ser...@serjux.com writes:

 On Fri, 2012-03-30 at 02:53 +0200, Stephan Raue wrote: 
 its similiar to https://bugs.gentoo.org/show_bug.cgi?id=402285 :
 
 using -O2 instead -O3 solves the build problem.

 Changing optimization shouldn't change compile behavior (though), 

Higher optimization levels can lead to the compiler doing deeper
analysis of the code.  Which in turn can enable it to detect more
potential problems.

eirik
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com