aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C
blob: d997b61e26e97d45932127aa0e8aa9bc00e6333f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// g++ 1.36.1 bug 900212_02

// g++ fails to flag as errors attempts to take the difference of two values
// of some compatible pointer-to-member type.

// Cfront 2.0 passes this test.

// keywords: pointer arithmetic, subtraction, member pointers

struct struct0 {
};

int struct0::*p0;
int struct0::*p1;

int (struct0::*fp0) ();
int (struct0::*fp1) ();

int result;

void global_function_0 ()
{
  result = (p0 - p1);		// ERROR - 
  result = (fp0 - fp1);		// ERROR - 
}

int main () { return 0; }