mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Revert "Add and use SDL_FALLTHROUGH
for fallthroughs"
This reverts commit 66a08aa391
.
This causes problems with older compilers:
https://github.com/libsdl-org/SDL/pull/4791#issuecomment-966630997
This commit is contained in:
parent
36b2690e40
commit
abc12a832c
15 changed files with 55 additions and 63 deletions
|
@ -164,22 +164,3 @@
|
|||
#endif
|
||||
#endif /* NULL */
|
||||
#endif /* ! Mac OS X - breaks precompiled headers */
|
||||
|
||||
#ifndef SDL_FALLTHROUGH
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
|
||||
#define SDL_FALLTHROUGH [[fallthrough]]
|
||||
#else
|
||||
#ifdef __has_attribute
|
||||
#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
|
||||
#else
|
||||
#define _HAS_FALLTHROUGH 0
|
||||
#endif /* __has_attribute */
|
||||
#if _HAS_FALLTHROUGH
|
||||
#define SDL_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
#else
|
||||
#define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
|
||||
#endif /* _HAS_FALLTHROUGH */
|
||||
#undef _HAS_FALLTHROUGH
|
||||
#endif /* C++17 or C2x */
|
||||
#endif /* SDL_FALLTHROUGH not defined */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue