Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900213_03.C
blob20e43e9729a437d97231e163e0a0bf128a0da11b
1 // { dg-do assemble  }
2 // g++ 1.36.1 bug 900213_03
4 // g++ fails to detect an error when the address of a "bound" function is
5 // assigned to a pointer-to-member-function variable.
7 // It does however correctly detect a similar errors for data-members.
9 // keywords: bound function, operator&, member pointers
11 struct struct0 {
12   int data_member;
13   int function_member ();
16 int i;
17 int struct0::*dmp;
18 int (struct0::*fmp) ();
20 struct0 *ptr;
22 void global_function_0 ()
24   fmp = &ptr->function_member;  // { dg-error "15:ISO C\\+\\+ forbids taking the address of a bound member function" } 
25   //dmp = &ptr->data_member;    //  caught by g++, missed by cfront
28 int main () { return 0; }