URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [warn5.C] - Rev 305
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-Wpointer-arith" }
double X(const double x) { return x; }
double Y() { return 1.0; }
double Z() { return 2.0; }
struct A {
void bar() { }
void foo() { }
};
typedef void (A::*pmf)();
static int mememe = &A::foo - &A::bar; // { dg-error "invalid operands" }
pmf b = &A::foo-1; // { dg-error "invalid operands" }
int main() {
double y;
y=X(Y-Z); // { dg-error "pointer to a function" }
}