On Fri, Jan 21, 2005 at 10:53:21PM +0100, Guillaume POIRIER wrote:
Hi, Le dimanche 16 janvier 2005 à 16:42 +0100, Guillaume POIRIER a écrit :
MPlayer-pre6 was supposed to support gcc-4.0, but it looks like on my machine, there still are some files that are problematic:
- libaf/af.c [..]
See below for gcc's output. [..]
make[2]: Entering directory `/home/guillaume/main/libaf' /usr/lib/gcc-snapshot/bin/gcc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -g -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Wall -o af.o af.c `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. af.c: In function 'af_outputlen': af.c:527: error: address of register variable 'mul' requested af.c: In function 'af_inputlen': af.c:544: error: address of register variable 'mul' requested af.c: In function 'af_calc_insize_constrained': af.c:568: error: address of register variable 'mul' requested make[2]: *** [af.o] Error 1 make[2]: Leaving directory `/home/guillaume/main/libaf' make[1]: *** [libaf/libaf.a] Erreur 2 make[1]: Leaving directory `/home/guillaume/main' make: *** [build-stamp] Erreur 2
Here's a patch that allows the compilation with gcc-4.0.0 of libaf/af.c. Tested also with gcc-2.95.4, 3.3.5, 3.4.4 on i386. They all compile fine.
Please comment on that patch.
It's very simple, and this is the reason why I'm worried I maybe underestimated the problem. The issue addressed is just that it's obviously syntacticly incorrect to use the "&" operand to take the address of a variable that is declared as "register". Now I guess there must be a good reason that the code was written that way, but I don't see it...
No, the reason it was written that way is that Anders is an idiot. Actually the register keyword should almost never be used, certainly not here. We're shipping 100000l of cola his way; in the mean time just..
No commit without any go-ahead.
..commit. :) Rich