Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ----
4 fail_compilation/test17868b.d(9): Error: pragma `crt_constructor` can only apply to a single declaration
5 fail_compilation/test17868b.d(14): Error: function `test17868b.bar` must return `void` for `pragma(crt_constructor)`
6 fail_compilation/test17868b.d(18): Error: function `test17868b.baz` must be `extern(C)` for `pragma(crt_constructor)` when taking parameters
7 ----
8 */
9 pragma(crt_constructor):
10 void foo()
11 {
12 }
13
14 extern(C) int bar()
15 {
16 }
17
18 void baz(int argc, char** argv)
19 {
20 }
21
22 extern(C) void bazC(int, char**)
23 {
24 }