From 8f5a4cfc7ed9e06e07fdd8e8fdf50ef3ea783f63 Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Thu, 16 Jan 2025 16:02:52 +0000 Subject: win32: remove usage of attribute gcc_struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This attribute is not recognized by clang. An investigation has been performed to ensure this attribute has no effect on layout of structures we use in QEMU [1], so it's safe to remove now. In the future, we'll forbid introducing new bitfields in packed struct, as they are the one potentially impacted by this change. [1] https://lore.kernel.org/qemu-devel/66c346de-7e20-4831-b3eb-1cda83240af9@linaro.org/ Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Acked-by: Stefano Garzarella Signed-off-by: Pierrick Bouvier Acked-by: Michael S. Tsirkin Tested-by: Stefan Weil Tested-by: Philippe Mathieu-Daudé Message-Id: <20250110203401.178532-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-24-alex.bennee@linaro.org> --- include/qemu/compiler.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/qemu/compiler.h') diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index c06954c..d904408 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,12 +22,7 @@ #define QEMU_EXTERN_C extern #endif -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define QEMU_PACKED __attribute__((gcc_struct, packed)) -#else -# define QEMU_PACKED __attribute__((packed)) -#endif - +#define QEMU_PACKED __attribute__((packed)) #define QEMU_ALIGNED(X) __attribute__((aligned(X))) #ifndef glue -- cgit v1.1