[MPlayer-dev-eng] [PATCH] -fno-strict-aliasing on gcc > 3
Michael Niedermayer
michaelni at gmx.at
Wed Jul 13 21:48:57 CEST 2005
Hi
On Wednesday 13 July 2005 17:01, Reimar Döffinger wrote:
> Hi,
>
> On Tue, Jul 12, 2005 at 09:59:07PM +0300, Uoti A Urpala wrote:
> > Reimar Döffinger wrote:
> > > Anyway I'd say the values are well in the error margin.
> > >
> > > compiled with gcc 3.4.4 (Debian)
> >
> > gcc 3.4 does less with strict-aliasing than gcc 4 (and most people
> > didn't seem to hit problems with non-strict-aliasing-safe code before
> > gcc 4).
>
> So IMHO this means we have the choice between using -fno-strict-aliasing
> or finding somebody to fix mp3lib, libmpeg2 and libfaad2.
i bet many more are affected
> The latter one we've been trying now since almost one year btw.
well, id say add -fno-strict-aliasing to the files which need it but leave the
rest for now
the real problem is again that gcc is crap, it is too silly to figure out
which pointers clearly cant alias each other (so that -fno-strict-aliasing
would be fast enough) and OTOH its to silly to realize that a x= (float*)y
means that both alias each other so either way sucks, the programmer has to
do what the compiler should do
IMHO we should add -fno-strict-aliasing everywhere and use the restrict
keyword where pointers cant alias each other and where speed does matter
[...]
--
Michael
More information about the MPlayer-dev-eng
mailing list