summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/include/freetype/internal/compiler-macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/internal/compiler-macros.h')
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/compiler-macros.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/3rdparty/freetype/include/freetype/internal/compiler-macros.h b/src/3rdparty/freetype/include/freetype/internal/compiler-macros.h
index 66fa13c3c5..6f67650979 100644
--- a/src/3rdparty/freetype/include/freetype/internal/compiler-macros.h
+++ b/src/3rdparty/freetype/include/freetype/internal/compiler-macros.h
@@ -4,7 +4,7 @@
*
* Compiler-specific macro definitions used internally by FreeType.
*
- * Copyright (C) 2020-2022 by
+ * Copyright (C) 2020-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -36,6 +36,22 @@ FT_BEGIN_HEADER
# endif
#endif
+ /* Newer compilers warn for fall-through case statements. */
+#ifndef FALL_THROUGH
+# if ( defined( __STDC_VERSION__ ) && __STDC_VERSION__ > 201710L ) || \
+ ( defined( __cplusplus ) && __cplusplus > 201402L )
+# define FALL_THROUGH [[__fallthrough__]]
+# elif ( defined( __GNUC__ ) && __GNUC__ >= 7 ) || \
+ ( defined( __clang__ ) && \
+ ( defined( __apple_build_version__ ) \
+ ? __apple_build_version__ >= 12000000 \
+ : __clang_major__ >= 10 ) )
+# define FALL_THROUGH __attribute__(( __fallthrough__ ))
+# else
+# define FALL_THROUGH ( (void)0 )
+# endif
+#endif
+
/*
* When defining a macro that expands to a non-trivial C statement, use
* FT_BEGIN_STMNT and FT_END_STMNT to enclose the macro's body. This
@@ -258,7 +274,7 @@ FT_BEGIN_HEADER
* To export a variable, use `FT_EXPORT_VAR`.
*/
- /* See `freetype/config/compiler_macros.h` for the `FT_EXPORT` definition */
+ /* See `freetype/config/public-macros.h` for the `FT_EXPORT` definition */
#define FT_EXPORT_DEF( x ) FT_FUNCTION_DEFINITION( x )
/*