https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80346
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- The warning for attachment 41147 looks valid. It points to the g_malloc0_n(__n, __s) call in the else statement in the following block. If I'm reading it right, there, __s is non-zero, and __n is equal to SIZE_MAX: do { gint64 __n1 = (tables_nr), __n2 = (0); if (__n1 > __n2) ; else g_assertion_message_cmpnum (((gchar*) 0), "bug2.c", 59, ((const char*) (__func__)), "tables_nr" " " ">" " " "0", __n1, ">", __n2, 'i'); } while (0); tables = (uint32_t *) (__extension__ ({ gsize __n = (gsize) (tables_nr); gsize __s = sizeof (uint32_t); gpointer __p; if (__s == 1) __p = g_malloc0 (__n); else if (__builtin_constant_p (__n) && (__s == 0 || __n <= (0x7fffffffffffffffL * 2UL + 1UL) / __s)) __p = g_malloc0 (__n * __s); else __p = g_malloc0_n (__n, __s); __p; }));