util: use c11 alignas instead of rolling our own
Due to how alignas is defined, it itsn't allowed to use it on a struct, it needs to be used on the first member instead. So move the declaration in those cases. This still leaves the ALIGN16 macro using compiler-specific directives, because it's a lot of work to untangle the above. This probably deserves its own MR. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908>
This commit is contained in:

committed by
Marge Bot

parent
2c43044507
commit
e3bc78b8e3
@@ -413,6 +413,7 @@ u_uintN_max(unsigned bit_size)
|
||||
#ifndef __cplusplus
|
||||
#ifdef _MSC_VER
|
||||
#define alignof _Alignof
|
||||
#define alignas _Alignas
|
||||
#else
|
||||
#include <stdalign.h>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user