Hi Andrew,

On 05/12/2023 19:49, Andrew Cooper wrote:
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.

That's good to know, I wasn't sure and..


https://godbolt.org/z/PM7bb1d55

.. I keep forgetting godbolt.org can help to check old compilers.

I will update the patch in my tree.


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

Thanks!

Cheers,

--
Julien Grall

Reply via email to