[FFmpeg-devel] [PATCH] compat/atomics/gcc: use __typeof__ instead of typeof

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Mar 18 00:31:25 EET 2017


2017-03-17 19:46 GMT+01:00 James Almer <jamrial at gmail.com>:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  compat/atomics/gcc/stdatomic.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/compat/atomics/gcc/stdatomic.h b/compat/atomics/gcc/stdatomic.h
> index 41caddec5c..2b64687437 100644
> --- a/compat/atomics/gcc/stdatomic.h
> +++ b/compat/atomics/gcc/stdatomic.h
> @@ -100,8 +100,8 @@ do {                                    \
>
>  #define atomic_exchange(object, desired)                            \
>  ({                                                                  \
> -    typeof(object) _obj = (object);                                 \
> -    typeof(*object) _old;                                           \
> +    __typeof__(object) _obj = (object);                             \
> +    __typeof__(*object) _old;                                       \

Maybe mention why this is a good idea?

Carl Eugen


More information about the ffmpeg-devel mailing list