SDL/include
Misa 66a08aa391 Add and use `SDL_FALLTHROUGH` for fallthroughs
Case fallthrough warnings can be suppressed using the __fallthrough__
compiler attribute. Unfortunately, not all compilers have this
attribute, or even have __has_attribute to check if they have the
__fallthrough__ attribute. [[fallthrough]] is also available in C++17
and the next C2x, but not everyone uses C++17 or C2x.

So define the SDL_FALLTHROUGH macro to deal with those problems - if we
are using C++17 or C2x, it expands to [[fallthrough]]; else if the
compiler has __has_attribute and has the __fallthrough__ attribute, then
it expands to __attribute__((__fallthrough__)); else it expands to an
empty statement, with a /* fallthrough */ comment (it's a do {} while
(0) statement, because users of this macro need to use a semicolon,
because [[fallthrough]] and __attribute__((__fallthrough__)) require a
semicolon).

Applications using SDL are also free to use this macro (because it is
defined in begin_code.h).

All existing /* fallthrough */ comments have been replaced with this
macro. Some of them were unnecessary because they were the last case in
a switch; using SDL_FALLTHROUGH in those cases would result in a compile
error on compilers that support __fallthrough__, for having a
__attribute__((__fallthrough__)) statement that didn't immediately
precede a case label.
2021-11-11 07:23:25 -08:00
..
SDL.h Build hidapi code into SDL as a new public API 2021-11-07 23:00:59 -08:00
SDL_assert.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_atomic.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_audio.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_bits.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_blendmode.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_clipboard.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_config.h Add SDL_config_emscripten.h 2021-08-14 17:04:46 +01:00
SDL_config.h.cmake video: Add SDL_SetWindowMouseRect. 2021-11-08 14:16:54 -08:00
SDL_config.h.in video: Add SDL_SetWindowMouseRect. 2021-11-08 14:16:54 -08:00
SDL_config_android.h Enable AAUDIO driver for Android 2021-08-10 14:50:43 -07:00
SDL_config_emscripten.h Revert "include: Updated SDL_config_emscripten.h from emscripten-ports." 2021-11-08 15:16:18 -05:00
SDL_config_iphoneos.h configuration updates for dlopen: 2021-08-10 12:07:32 -07:00
SDL_config_macosx.h x11: Don't include X11/extensions/extutil.h 2021-09-20 10:22:50 -04:00
SDL_config_minimal.h Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems 2021-11-08 07:19:45 -08:00
SDL_config_os2.h minor update to os2 config file. 2021-11-08 21:15:04 +03:00
SDL_config_pandora.h configuration updates for dlopen: 2021-08-10 12:07:32 -07:00
SDL_config_psp.h Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems 2021-11-08 07:19:45 -08:00
SDL_config_windows.h SDL_config_windows.h: detect winsdkver.h using __has_include() 2021-11-05 21:06:58 -05:00
SDL_config_winrt.h Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems 2021-11-08 07:19:45 -08:00
SDL_config_wiz.h configuration updates for dlopen: 2021-08-10 12:07:32 -07:00
SDL_copying.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_cpuinfo.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_egl.h Added SDL_USE_BUILTIN_OPENGL_DEFINITIONS to avoid system OpenGL headers 2021-10-21 20:48:08 -07:00
SDL_endian.h Integrate fix for Source 2's Win32 build that does '#define __i386__ 1' which causes it to hit the __i386__ case instead of the _MSC_VER case. 2021-09-21 18:15:10 -07:00
SDL_error.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_events.h Added mouse wheel deltas with floating point precision 2021-11-08 09:44:31 -08:00
SDL_filesystem.h Sync wiki -> header 2021-09-28 17:03:06 +00:00
SDL_gamecontroller.h Sync wiki -> header 2021-11-10 15:21:01 -05:00
SDL_gesture.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_haptic.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_hidapi.h Sync wiki -> header 2021-11-10 16:05:03 -05:00
SDL_hints.h Added support for /dev/input/js* on Linux 2021-11-10 20:02:25 -08:00
SDL_joystick.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_keyboard.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_keycode.h Restore KMOD_RESERVED for backward compatibility 2021-08-17 10:00:14 +03:00
SDL_loadso.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_locale.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_log.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_main.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_messagebox.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_metal.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_misc.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_mouse.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_mutex.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_name.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengl.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengl_glext.h Don't have Windows headers define min/max, in case they're defined by application code 2019-09-11 15:08:37 -07:00
SDL_opengles.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengles2.h Added SDL_USE_BUILTIN_OPENGL_DEFINITIONS to avoid system OpenGL headers 2021-10-21 20:48:08 -07:00
SDL_opengles2_gl2.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2ext.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2platform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_khrplatform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_pixels.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_platform.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_power.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_quit.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_rect.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_render.h Sync wiki -> header 2021-11-10 16:05:03 -05:00
SDL_revision.h The revision defaults to the empty string 2021-02-12 08:54:08 -08:00
SDL_revision.h.cmake cmake: Retrieve the git revision on platforms without bash 2021-09-09 22:34:42 -04:00
SDL_rwops.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_scancode.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_sensor.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_shape.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_stdinc.h Add and use `SDL_FALLTHROUGH` for fallthroughs 2021-11-11 07:23:25 -08:00
SDL_surface.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_system.h Sync wiki -> header 2021-11-10 16:05:03 -05:00
SDL_syswm.h Add a barebones RISC OS video driver 2021-10-30 21:25:01 -07:00
SDL_test.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_assert.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_common.h video: Add SDL_SetWindowMouseRect. 2021-11-08 14:16:54 -08:00
SDL_test_compare.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_crc32.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_font.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_fuzzer.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_harness.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_images.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_log.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_md5.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_memory.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_random.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_thread.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_timer.h Sync wiki -> header 2021-11-10 16:05:03 -05:00
SDL_touch.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_types.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_version.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
SDL_video.h Sync wiki -> header 2021-11-10 16:05:03 -05:00
SDL_vulkan.h Sync wiki -> header 2021-10-27 01:36:05 +00:00
begin_code.h Add and use `SDL_FALLTHROUGH` for fallthroughs 2021-11-11 07:23:25 -08:00
close_code.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00