mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
Merge branch 'fix/assert-not-reached-on-msvc' into 'master'
gtestutils: Fix g_assert_not_reached() on MSVC See merge request GNOME/glib!1857
This commit is contained in:
commit
179679837b
@ -219,6 +219,8 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
||||
* GCC 5 is not a strict lower bound for versions of GCC which provide __builtin_unreachable(). */
|
||||
#if __GNUC__ >= 5 || g_macro__has_builtin(__builtin_unreachable)
|
||||
#define g_assert_not_reached() G_STMT_START { (void) 0; __builtin_unreachable (); } G_STMT_END
|
||||
#elif defined (_MSC_VER)
|
||||
#define g_assert_not_reached() G_STMT_START { (void) 0; __assume (0); } G_STMT_END
|
||||
#else /* if __builtin_unreachable() is not supported: */
|
||||
#define g_assert_not_reached() G_STMT_START { (void) 0; } G_STMT_END
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user