> gcc -c -I../../include -I../../src/mesa -I../../src/gallium/include 
> -I../../src/gallium/auxiliary -Wall -Wmissing-prototypes 
> -Wdeclaration-after-statement -Wpointer-arith -g -fPIC  -D_POSIX_SOURCE 
> -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE 
> -DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN -DDEBUG -DDEBUG_MATH  
> -I/usr/X11R6/include -std=c99 -ffast-math -fno-strict-aliasing -ansi 
> -pedantic state_tracker/st_cb_texture.c -o state_tracker/st_cb_texture.o
> state_tracker/st_cb_texture.c: In function 'st_TexImage':
> state_tracker/st_cb_texture.c:689: warning: initialization discards 
> qualifiers from pointer target type
> state_tracker/st_cb_texture.c:690: error: 'for' loop initial declarations are 
> only allowed in C99 mode

On my setup (./configure && make) Mesa is getting built in C99 mode,
which compiles that code.
The command line you quoted actually contains "-std=c99", but also
contains "-ansi" later, which is causing the problem.

It seems that the "linux-debug" target includes "-ansi" (thus
disabling C99) but the default autoconf one doesn't, resulting in C99
mode!

Some parts of the codebase (such as all radeon drivers) contain for
loop declarations and thus require C99 mode.
I think "-ansi" should be removed from all files in configs/*.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to