1 // { dg-do compile } 2 // GROUPS passed old-abort 3 typedef int element; 4 class Pix { 5 public: 6 Pix(); 7 Pix(const Pix&); 8 9 // Friend functions so that v == x works as does x == v works 10 friend int operator==(void *v, const Pix& x) // { dg-message "previously" } 11 { return v == index; } // { dg-error "non-static" } 12 // ??? should be operator!= 13 friend int operator==(void *v, const Pix& x) // { dg-error "redefinition" } 14 { return v != index; } 15 private: 16 // friend class List<T>; 17 element *index; // { dg-message "" } 18 }; 19