summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/friend5.C
blob: 0a55ce4cb10b2f87b5b636e317023633f385c6fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do assemble  }
// { dg-options "-Wreturn-type" }
// GROUPS passed friends

        extern "C" int good_friend(int);
        extern "C" int bad_friend();

        class assembler {
            friend int good_friend(int);
            friend int bad_friend();
            void *parts;
        };

        assembler obj;

        int good_friend(int)
        {
            obj.parts = 0;
        } // { dg-warning "non-void" }

        int bad_friend()
        {
            obj.parts = 0;
        } // { dg-warning "non-void" }