Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/cppvar.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/cppvar.d(10): Error: variable `cppvar.funcLiteral` cannot have `extern(C++)` linkage because it is `static`
5 fail_compilation/cppvar.d(10): perhaps declare it as `__gshared` instead
6 fail_compilation/cppvar.d(20): Error: variable `cppvar.threadLocalVar` cannot have `extern(C++)` linkage because it is `static`
7 fail_compilation/cppvar.d(20): perhaps declare it as `__gshared` instead
8 fail_compilation/cppvar.d(21): Error: variable `cppvar.staticVar` cannot have `extern(C++)` linkage because it is `static`
9 fail_compilation/cppvar.d(21): perhaps declare it as `__gshared` instead
10 fail_compilation/cppvar.d(22): Error: variable `cppvar.sharedVar` cannot have `extern(C++)` linkage because it is `shared`
11 fail_compilation/cppvar.d(22): perhaps declare it as `__gshared` instead
12 fail_compilation/cppvar.d(30): Error: delegate `() { bool[3] a = false; return a; }` cannot return type `bool[3]` because its linkage is `extern(C++)`
13 ---
14 */
15 #line 10
16 extern(C++) bool[3] funcLiteral = () { bool[3] a; return a; };
17 #line 20
18 extern(C++) int threadLocalVar;
19 extern(C++) static int staticVar;
20 extern(C++) shared int sharedVar;
21 #line 30
22 extern(C++) __gshared bool[3] gfuncLiteral = () { bool[3] a; return a; };