[FFmpeg-devel] [PATCH 2/2] Use gcc/clang builtins for av_sat_(add|sub)_64_c if available.

Dale Curtis dalecurtis at chromium.org
Wed May 20 23:02:39 EEST 2020


On Wed, May 20, 2020 at 1:17 AM Michael Niedermayer <michael at niedermayer.cc>
wrote:

>
> In file included from ./libavutil/avutil.h:296:0,
>                  from ./libavutil/log.h:25,
>                  from ./libavutil/thread.h:34,
>                  from libavdevice/alldevices.c:22:
> ./libavutil/common.h: In function ‘av_sat_add64_c’:
> ./libavutil/common.h:302:105: error: missing binary operator before token
> "("
>  #if (!defined(__INTEL_COMPILER) && AV_GCC_VERSION_AT_LEAST(5,1)) ||
> (defined(__clang__) && __has_builtin(__builtin_add_overflow))
>
>
What compiler is this? This is a seriously ancient function, so surprised
it's not present, but a && __has_builtin would fix this.


More information about the ffmpeg-devel mailing list