Closed
Description
The static asserts below fail with GCC and Clang <= 20, but pass in Godbolt trunk and clang-21 from Debian nightly repo
_Static_assert(1 == _Generic((int)0 , void : 1),"");
_Static_assert(1 == _Generic((float)0 , void : 1),"");
_Static_assert(1 == _Generic((void*)0 , void : 1),"");
_Static_assert(1 == _Generic((int[4]){}, void : 1),"");
_Static_assert(4 == _Generic(42, void: 4, int: 2),"");
_Static_assert(2 == _Generic(42, int: 2, void: 4),"");
_Static_assert(4 == _Generic(42, void: 4),"");
_Static_assert(2 == _Generic(42, int: 2),"");
Godbolt: https://godbolt.org/z/he9xYrPxq