[Vorbis-dev] various patches from Mandrakelinux package

Segher Boessenkool segher
Wed Aug 4 23:11:57 PDT 2004


<200408021700.51505.fhimpe at telenet.be>
<200408021758.45888.fhimpe at telenet.be>
<200408031337.47283.msmith at xiph.org>
Message-ID: <5ADC15B0-E6A6-11D8-A013-000A95A4DC02 at kernel.crashing.org>

> Why is the patch needed? From the filename, I'm guessing it's
> something to do
> with aliasing rules. Was this actually causing problems in practice?
> Does
> this version still compile to efficient code (the whole reason for
> those
> functions was to be very fast) with (at least) gcc and msvc?

Don't know if it _was_ causing problems, but it certainly has
the potential to do so, esp. with newer versions of GCC.

This patch won't work with MSVC though, as it relies on
implementation-dependent behaviour in GCC (union elements
are allowed to alias always); there is _no_ portable way
to access an object as a different type, in C.


Segher



More information about the Vorbis-dev mailing list