OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-9.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/11224
2
// { dg-options "-Wunused" }
3
 
4
struct someclass {
5
 
6
  bool isEmpty() const { return true; }
7
};
8
 
9
int main()
10
{
11
  bool bOk = false;
12
  someclass foo;
13
 
14
  bOk == foo.isEmpty(); // { dg-warning "not used" }
15
 
16
  return bOk;
17
}
18
 
19
int& f();
20
 
21
void g() {
22
  f() == 0; // { dg-warning "not used" }
23
  f() != 1; // { dg-warning "not used" }
24
  f() < 2; // { dg-warning "not used" }
25
  f() > 3; // { dg-warning "not used" }
26
  f() <= 4; // { dg-warning "not used" }
27
  f() >= 5; // { dg-warning "not used" }
28
  f() + 6; // { dg-warning "not used" }
29
  f() - 7; // { dg-warning "not used" }
30
  f() * 8; // { dg-warning "not used" }
31
  f() / 9; // { dg-warning "not used" }
32
  +f(); // { dg-warning "not used" }
33
  -f(); // { dg-warning "not used" }
34
  ++f();
35
  --f();
36
  f() = 10;
37
  f() <<= 11;
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.