summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wdiv-by-zero.C
blob: 7dc77667c225ee5181c15a3cbd51efa2f1474a22 (plain)
1
2
3
4
5
6
7
// test that division by zero warnings are enabled by default
int breakme()
{
  int x = 0;
  x /= 0;          // { dg-warning "division by" }
  return x;
}