Debian Codegraph @

gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C

raw
1 // Contributed by Dodji Seketeli <[email protected]>
2 // Origin: PR c++/41020
3 // { dg-do compile }
4
5
6 class frok
7 {
8 int this_errno;
9 friend int fork (void); // { dg-message "previous declaration .*?C\\+\\+. linkage" }
10 };
11
12 extern "C" int
13 fork (void) // { dg-error "conflicting declaration .*?C. linkage" }}
14 {
15 frok grouped;
16 return grouped.this_errno;
17 }
18