[FFmpeg-devel] [PATCH 3/8] Don't use the force_align_arg_pointer attribute with ICC.

Måns Rullgård mans
Thu Oct 2 16:53:57 CEST 2008


Diego 'Flameeyes' Petten? wrote:
> The Intel C Compiler does not support the force_align_arg_pointer
> attribute that GCC 4.1+ supports, although it declares itself as GCC
> 4.3.0, disable the attribute if __ICC is also defined.
> ---
>
>  libavutil/internal.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavutil/internal.h b/libavutil/internal.h
> index 0eb25d5..8337c82 100644
> --- a/libavutil/internal.h
> +++ b/libavutil/internal.h
> @@ -35,7 +35,7 @@
>  #include <assert.h>
>
>  #ifndef attribute_align_arg
> -#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__>1)
> +#if defined(__GNUC__) && !defined(__ICC) && (__GNUC__ > 4 || __GNUC__ == 4
&& __GNUC_MINOR__>1)

This is getting repetitive.

Maybe a better approach would be to define a something like FF_GCC_COMPAT
based on whatever predefined macros the compiler supplies.  This would
simplify all the tests, and at the same time make it easier to update
if/when icc catches up.  This could be useful for other compilers than
icc too.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list