[MPlayer-dev-eng] [PATCH] gcc-4.0 support

Guillaume POIRIER guillaume.poirier at etudiant.univ-rennes1.fr
Fri Jan 21 22:53:21 CET 2005


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 commit without any go-ahead.

Regards,
Guillaume
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MP-af.c-gcc4.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/28270694/attachment.bin>


More information about the MPlayer-dev-eng mailing list