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: e3bc78b8e3 ("util: use c11 alignas instead of rolling our own")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6667
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17035>
This commit is contained in:
Mike Lothian 2022-06-14 20:00:22 +01:00 committed by Marge Bot
parent e24354c1b2
commit e1accb1c4c
1 changed files with 2 additions and 2 deletions

View File

@ -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)