qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] configure: Fix atomic64 test for --enable-werror on macO


From: Christian Schoenebeck
Subject: Re: [RFC PATCH] configure: Fix atomic64 test for --enable-werror on macOS
Date: Thu, 16 Jul 2020 16:15:36 +0200

On Donnerstag, 16. Juli 2020 15:11:01 CEST Thomas Huth wrote:
> When using --enable-werror for the macOS builders in the Cirrus-CI,
> the atomic64 test is currently failing, and config.log shows a bunch
> of error messages like this:
> 
>  config-temp/qemu-conf.c:6:7: error: implicit declaration of function
>  '__atomic_load_8' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] y = __atomic_load_8(&x, 0);
>       ^
>  config-temp/qemu-conf.c:6:7: error: this function declaration is not a
>  prototype [-Werror,-Wstrict-prototypes]

Well, __atomic_*_8() functions do exist on macOS, but it does not look like 
they are supposed to be 'officially' used.

You can compile sources with these functions, and yes they are linking fine 
despite the warning, but IMO not a good idea to use them, as AFAICS they are 
not defined by any public header file.

> Suppress the warnings to make it pass.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  Not sure whether this is the best way to fix this issue ... thus marked
>  as RFC.

Probably it is better to switch to their official C11 counterpart functions 
for this test, like e.g. __atomic_load() instead of __atomic_load_8(), etc.
That's what the actual qemu code base is using actually anyway.

Best regards,
Christian Schoenebeck





reply via email to

[Prev in Thread] Current Thread [Next in Thread]