[FFmpeg-devel] [PATCH] Allow compilation with icc

Reimar Döffinger Reimar.Doeffinger
Sat Feb 9 12:02:21 CET 2008

On Sat, Feb 09, 2008 at 11:21:25AM +0100, Carl Eugen Hoyos wrote:
> Attached patch allows compilation of ffmpeg with icc 10.1.012.
> Carl Eugen

> Index: libavutil/mem.h
> ===================================================================
> --- libavutil/mem.h	(Revision 11882)
> +++ libavutil/mem.h	(Arbeitskopie)
> @@ -28,7 +28,11 @@
>  #ifdef __GNUC__
>    #define DECLARE_ALIGNED(n,t,v)       t v __attribute__ ((aligned (n)))
> +#ifdef __ICC
> +  #define DECLARE_ASM_CONST(n,t,v)     const t __attribute__ ((aligned (n))) v
> +#else
>    #define DECLARE_ASM_CONST(n,t,v)     static const t v attribute_used __attribute__ ((aligned (n)))
> +#endif
>  #else
>    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
>    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v

This is something I wanted to mention a long time ago. This #else part
seems completely idiotic to me, we do not support any compiler that uses
__declspec, do we?
If anything we should use something completely standards-compliant
(though I doubt that makes sense here) or in this case just copy the gcc
way IMO...

Reimar D?ffinger

More information about the ffmpeg-devel mailing list