Created attachment 15208 [details] program illustrating bogus warning With the attached program, clang complains u.c:5:47: warning: division by zero is undefined [-Wdivision-by-zero] int j = _Generic (i, int: 0, default: 0 ? 1 / 0 : 1); ^ ~ The warning is bogus because the expression is not evaluated, for two reasons: first, it's inside a _Generic alternative not taken; second, it's inside an if-branch that's not taken.