summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash18.C
blob: 119ba46053859622782b796a49d980d0a12cb88b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
// GROUPS passed old-abort
typedef int element;
class Pix {
public:
    Pix();
    Pix(const Pix&);

    // Friend functions so that v == x works as does x == v works
    friend int operator==(void *v, const Pix& x) // { dg-error "previously" }
    { return v == index; }  // { dg-error "from this location" }
    // ??? should be operator!=
    friend int operator==(void *v, const Pix& x) // { dg-error "redefinition" }
    { return v != index; }
private:
//    friend class List<T>;
    element *index; // { dg-error "invalid use of non-static data member" }
};