[FFmpeg-devel] [PATCH 3/7] Add alias-safe union typedefs

Alexander Strange astrange
Mon Feb 1 01:22:58 CET 2010

On Jan 31, 2010, at 7:13 PM, M?ns Rullg?rd wrote:

> Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:
>>> Casts with may_alias were found to work for x264, but the portable
>>> solution is probably either no strict aliasing or using memcpy().
>> Why would no strict aliasing be more portable than may_alias?
> I think he meant writing the code without any aliasing violations in
> the first place.  Unfortunately that is not an option until compilers
> get a clue, and my thermometer in hell is still indicating hot.

I meant turning off the type-based aliasing optimizations in the compiler, if you're trying to build with some non-GNU C compiler that you don't know the may_alias equivalent for.
Although that's something the user has to do themselves, so it's not really a solution here.

More information about the ffmpeg-devel mailing list