util: Fixes -Wundef in util/compiler.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
This commit is contained in:
Yonggang Luo
2022-11-22 18:01:07 +08:00
committed by Marge Bot
parent b461921ed8
commit 37e863f3c1
+2 -1
View File
@@ -87,7 +87,8 @@
# define HAS_CLANG_FALLTHROUGH 0
#endif
#if __cplusplus >= 201703L || __STDC_VERSION__ > 201710L
#if (defined(__cplusplus) && (__cplusplus >= 201703L)) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201710L))
/* Standard C++17/C23 attribute */
#define FALLTHROUGH [[fallthrough]]
#elif HAS_CLANG_FALLTHROUGH