summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/pr23075.C
blob: e5b1b483d767142d838aafbf9bc348532ff54459 (plain)
1
2
3
4
5
6
7
8
9
// PR c/23075
// { dg-do compile }
// { dg-options "-O2 -Wreturn-type" }

int
foo (void)
{
  return;	// { dg-error "with no value" }
}		// { dg-warning "no return statement" }