OSDN Git Service

Remove gcc.target/arm/ivopts-6.c, didn't happen with patch.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / warn5.mm
1 /* Check to make sure that a c++ program compiled in objective-c++ mode
2    has no trace of meta-data specific diagnosis coming out of compiling it.
3    This is replicate of warn5.C.
4 */
5 // { dg-do assemble  }
6 // { dg-options "-Wpointer-arith" }
7
8 double X(const double x) { return x; }
9 double Y() { return 1.0; }
10 double Z() { return 2.0; }
11
12 struct A {
13   void bar() { }
14   void foo() { }
15 };
16
17 typedef void (A::*pmf)();
18
19 static int mememe = &A::foo - &A::bar;  // { dg-error "" } 
20 pmf b = &A::foo-1;      // { dg-error "" } 
21
22 int main() {
23     double y;
24     y=X(Y-Z);   // { dg-error "" } 
25 }