On 05/12/2023 6:32 pm, Julien Grall wrote:
> diff --git a/xen/Makefile b/xen/Makefile
> index ca571103c868..360fb6dcae57 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -393,6 +393,7 @@ CFLAGS-$(CONFIG_CC_SPLIT_SECTIONS) += -ffunction-sections 
> -fdata-sections
>  
>  CFLAGS += -nostdinc -fno-builtin -fno-common
>  CFLAGS += -Werror -Wredundant-decls -Wwrite-strings -Wno-pointer-arith
> +$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)

I agree with the direction of the patch, but this should be a plain
CFLAGS +=

All compilers we support, even on x86, know
-Wdeclaration-after-statement so it doesn't need a toolchain-check to
activate.

https://godbolt.org/z/PM7bb1d55

With that fixed, Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

Reply via email to