added __clang__ to compiler-specific alignment attribute
when clang is used within msvc, `__GNUC__` isn't defined, so testing `__clang__` explicitly is required.
This commit is contained in:
@@ -302,7 +302,7 @@ MEM_STATIC int ZSTD_isPower2(size_t u) {
|
|||||||
|
|
||||||
#ifndef ZSTD_ALIGNED
|
#ifndef ZSTD_ALIGNED
|
||||||
/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */
|
/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__) || defined(__clang__)
|
||||||
# define ZSTD_ALIGNED(a) __attribute__((aligned(a)))
|
# define ZSTD_ALIGNED(a) __attribute__((aligned(a)))
|
||||||
# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
|
# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
|
||||||
# define ZSTD_ALIGNED(a) _Alignas(a)
|
# define ZSTD_ALIGNED(a) _Alignas(a)
|
||||||
|
|||||||
Reference in New Issue
Block a user