https://llvm.org/bugs/show_bug.cgi?id=25390
Bug ID: 25390 Summary: _Generic -Wdivision-by-zero bogus warning Product: clang Version: 3.5 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: egg...@cs.ucla.edu CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15208 --> https://llvm.org/bugs/attachment.cgi?id=15208&action=edit 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. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs