I got a little confused when I read this macro : #define g_once_init_enter(location) which is defined in glib library.
#define g_once_init_enter(location) \
(G_GNUC_EXTENSION({ \
G_STATIC_ASSERT(sizeof *(location) == sizeof(gpointer)); \
(void) (0 ? (gpointer) *(location) : 0); \
(!g_atomic_pointer_get (location) && \
g_once_init_enter (location)); \
}))
what's the effect of this line :(void) (0 ? (gpointer) *(location) : 0);
and the last line is g_once_init_enter(location)
again, is it a dead loop?
Thanks for your reply.