FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900212_02.C
blobd997b61e26e97d45932127aa0e8aa9bc00e6333f
1 // g++ 1.36.1 bug 900212_02
3 // g++ fails to flag as errors attempts to take the difference of two values
4 // of some compatible pointer-to-member type.
6 // Cfront 2.0 passes this test.
8 // keywords: pointer arithmetic, subtraction, member pointers
10 struct struct0 {
13 int struct0::*p0;
14 int struct0::*p1;
16 int (struct0::*fp0) ();
17 int (struct0::*fp1) ();
19 int result;
21 void global_function_0 ()
23   result = (p0 - p1);           // ERROR - 
24   result = (fp0 - fp1);         // ERROR - 
27 int main () { return 0; }