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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-9.C] - Rev 149

Go to most recent revision | Compare with Previous | Blame | View Log

// PR c++/11224
// { dg-options "-Wunused" }

struct someclass {

  bool isEmpty() const { return true; }
};

int main()
{
  bool bOk = false;
  someclass foo;

  bOk == foo.isEmpty(); // { dg-warning "not used" }

  return bOk;
}

int& f();

void g() {
  f() == 0; // { dg-warning "not used" }
  f() != 1; // { dg-warning "not used" }
  f() < 2; // { dg-warning "not used" }
  f() > 3; // { dg-warning "not used" }
  f() <= 4; // { dg-warning "not used" }
  f() >= 5; // { dg-warning "not used" }
  f() + 6; // { dg-warning "not used" }
  f() - 7; // { dg-warning "not used" }
  f() * 8; // { dg-warning "not used" }
  f() / 9; // { dg-warning "not used" }
  +f(); // { dg-warning "not used" }
  -f(); // { dg-warning "not used" }
  ++f();
  --f();
  f() = 10;
  f() <<= 11; 
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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