[Ffmpeg-devel] [patch] strict-aliasing support
Hervé W.
H.O.W.aka.V+ffmpeg
Tue Jul 4 02:22:21 CEST 2006
On 04/07/06, Luca Barbato <lu_zero at gentoo.org> wrote:
> [...]
>
> I tested the following testcase on ppc, amd64 and x86 using gcc-4.1.1 on
> all of them and gcc-3.4.6 on x86, the value is correct for 16 and 8
> alignment. Could someone with a more ancient gcc test this testcase or
> equivalents?
>
>
> #include <stdio.h>
>
> void f()
> {
> int tmp[64] __attribute__((aligned(16)));
> printf("align %d\n", __alignof__(tmp));
> }
>
> int main()
> {
> f();
> }
I had no problem compiling the source code above with
gcc.exe (GCC) 3.4.4 (mingw special)
gcc.exe (GCC) 3.4.2 (mingw-special)
gcc 2.95.3-8 (also on mingw)
the result was a consistent:
align 16
However when replacing
> int tmp[64] __attribute__((aligned(16)));
with
int tmp[64] __attribute__((aligned(8)));
or
int tmp[64] __attribute__((aligned(32)));
the result was still
align 16
in both cases when using gcc 2.95.3
No problem for 3.4.2 or 3.4.4
-V
More information about the ffmpeg-devel
mailing list