Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / ptrmem10.C
blob8600e8292f2ab9ca04c80ff0b6534fb26c44ba70
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Aug 2000 <nathan@codesourcery.com>
6 // A pointer to member can only be formed by `&T::m', however, other forms
7 // are ok for pointer to static member. Thus the error can only be determined
8 // after overload resolution. In template deduction, this can disambiguate
9 // otherwise ambiguous cases.
11 struct A
13   static int f (int);
14   int f (short);
15   void baz ();
18 template <typename T> void foo (int (*)(T));      // { dg-message "note" } 
19 template <typename T> void foo (int (A::*)(T));   // { dg-message "note" } candidate
22 void A::baz ()
24   foo (&A::f);  // { dg-error "ambiguous" } 
25   foo (A::f);
26   foo (&(A::f));
27   foo (f);
28   foo (&f);