From e1accb1c4c505b4b32b5141d89865181a47567dc Mon Sep 17 00:00:00 2001 From: Mike Lothian Date: Tue, 14 Jun 2022 20:00:22 +0100 Subject: [PATCH] util: Fix invalid usage of alignas in u_cpu_detect.c This fixes the following errors when compiling Mesa with Clang 14: ../mesa-9999/src/util/u_cpu_detect.c:368:5: error: expected ';' after struct } alignas(16) fxarea; ^ ; This has been tested with Clang 14.0.5 and GCC 12.1 Fixes: e3bc78b8e39 ("util: use c11 alignas instead of rolling our own") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6667 Signed-off-by: Mike Lothian Reviewed-by: Jesse Natalie Reviewed-by: Yonggang Luo Acked-by: Erik Faye-Lund Part-of: --- src/util/u_cpu_detect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index 4d65804561a..83321a10859 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -361,11 +361,11 @@ static inline uint64_t xgetbv(void) #if defined(PIPE_ARCH_X86) PIPE_ALIGN_STACK static inline boolean sse2_has_daz(void) { - struct { + alignas(16) struct { uint32_t pad1[7]; uint32_t mxcsr_mask; uint32_t pad2[128-8]; - } alignas(16) fxarea; + } fxarea; fxarea.mxcsr_mask = 0; #if defined(PIPE_CC_GCC)