summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wunused-15.C
blob: efaebc006e8353de401191d4a06e4836f8ff0885 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/39875
// { dg-do compile }
// { dg-options "-Wunused-value" }

int *i;
void
foo ()
{
  *i++;		// { dg-warning "value computed is not used" }
  (void) *i++;	// { dg-bogus "value computed is not used" }
}