The following message is displayed and fails to compile. <snip> Making all in src gmake[2]: Entering directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1_build/src' CC mouse.lo /var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c:156:9: warning: initialization discards 'const' qualifier from pointer target type [enabled by default] /var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c: In function 'MousePreInit': /var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c:923:22: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] CC pnp.lo CC bsd_mouse.lo /var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/bsd_mouse.c: In function 'CheckProtocol': /var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/bsd_mouse.c:142:30: error: array subscript is above array bounds [-Werror=array-bounds] cc1: some warnings being treated as errors gmake[2]: *** [bsd_mouse.lo] Error 1 gmake[2]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1_build/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1_build' gmake: *** [all] Error 2 * ERROR: x11-drivers/xf86-input-mouse-1.8.1 failed (compile phase): * emake failed Reproducible: Always Steps to Reproduce: 1. set gcc 4.6 by gcc-config 2. . /etc/profile 3. emerge x11-drivers/xf86-input-mouse
Created attachment 324378 [details, diff] patch for x11-drivers/xf86-input-mouse-1.8.1 Original patch is here. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665390
Patch added to the tree. Thanks.
Will this patch have to be carried indefinitely or is that problem fixed in later gcc? If not, and if it is suitable for upstreaming, please send this to upstream for review.
(In reply to comment #3) > Will this patch have to be carried indefinitely or is that problem fixed in > later gcc? I've test with gcc-4.7.1 and it had no problem.