[FFmpeg-devel] [PATCH] strict-aliasing-safe aes.c

Jason Garrett-Glaser darkshikari
Tue Jun 29 03:10:07 CEST 2010


On Mon, Jun 28, 2010 at 5:33 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Jun 28, 2010 at 10:13:31PM +0200, Reimar D?ffinger wrote:
>> On Mon, Jun 28, 2010 at 10:02:15PM +0200, Michael Niedermayer wrote:
>> > On Mon, Jun 28, 2010 at 05:55:30PM +0200, Reimar D?ffinger wrote:
>> > > Hello,
>> > > this uses AV_WN32A, AV_WN64A etc. macros.
>> > > The generated code is the same on x86_64 (assuming I did not mess up that test).
>> >
>> > > ?aes.c | ? 20 +++++++++++++-------
>> > > ?1 file changed, 13 insertions(+), 7 deletions(-)
>> > > 76705b63949d4abbe51b0d7d59537045ae91179a ?aesalias.diff
>> >
>> > this makes the code unreadable, iam thus against it.
>>
>> Well, what is the alternative? The current code seems to not work with some compilers.
>
> Fix the compiler.

If I were to "fix the compiler", I would make it error out on your
code.  If the compiler can detect trivial aliasing violations, it can
properly reject them.

Dark Shikari



More information about the ffmpeg-devel mailing list