http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56607
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 15:59:09 UTC --- Author: jakub Date: Fri Mar 22 15:54:37 2013 New Revision: 196973 URL: http://gcc.gnu.org/viewcvs?rev=196973&root=gcc&view=rev Log: Backported from mainline 2013-03-16 Jakub Jelinek <ja...@redhat.com> PR c++/56607 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero, pass op1 through maybe_constant_value first. * g++.dg/warn/Wdiv-by-zero-2.C: New test. * c-c++-common/pr56607.c: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/pr56607.c branches/gcc-4_8-branch/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-2.C Modified: branches/gcc-4_8-branch/gcc/cp/ChangeLog branches/gcc-4_8-branch/gcc/cp/typeck.c branches/gcc-4_8-branch/gcc/testsuite/ChangeLog