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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [warn5.mm] - Blame information for rev 714

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

Line No. Rev Author Line
1 703 jeremybenn
/* 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
}

powered by: WebSVN 2.1.0

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