Function Macro

GLibtest_undefined

Declaration

#define g_test_undefined (
  void
)

Description

Returns TRUE if tests may provoke assertions and other formally-undefined behaviour, to verify that appropriate warnings are given. It might, in some cases, be useful to turn this off with if running tests under valgrind; in tests that use g_test_init(), the option -m no-undefined disables those tests, while -m undefined explicitly enables them (normally the default behaviour).

Since GLib 2.68, if GLib was compiled with gcc or clang and AddressSanitizer is enabled, the default changes to not exercising undefined behaviour.

This function is not directly available to language bindings.