@@ -11,7 +11,7 @@ TEST_OUTPUT:
11
11
12
12
import core.stdc.stdio ;
13
13
14
- extern (C++ ) int foob(int i, int j, int k);
14
+ extern (C++ ) int foob(int i, int j, int k) @system ;
15
15
16
16
class C
17
17
{
@@ -70,13 +70,13 @@ version (Win64)
70
70
71
71
/* ***************************************/
72
72
73
- extern (C++ )
73
+ extern (C++ ) @system
74
74
interface D
75
75
{
76
76
int bar (int i, int j, int k);
77
77
}
78
78
79
- extern (C++ ) D getD();
79
+ extern (C++ ) D getD() @system ;
80
80
81
81
void test2 ()
82
82
{
@@ -93,9 +93,9 @@ version (Posix)
93
93
94
94
/* ***************************************/
95
95
96
- extern (C++ ) int callE(E);
96
+ extern (C++ ) int callE(E) @system ;
97
97
98
- extern (C++ )
98
+ extern (C++ ) @system
99
99
interface E
100
100
{
101
101
int bar (int i, int j, int k);
@@ -131,7 +131,7 @@ version (Posix)
131
131
132
132
/* ***************************************/
133
133
134
- extern (C++ ) void foo4(char * p);
134
+ extern (C++ ) void foo4(char * p) @system ;
135
135
136
136
void test4 ()
137
137
{
@@ -145,7 +145,7 @@ version (Posix)
145
145
146
146
/* ***************************************/
147
147
148
- extern (C++ )
148
+ extern (C++ ) @system
149
149
{
150
150
struct foo5 { int i; int j; void * p; }
151
151
@@ -172,7 +172,7 @@ version (Posix)
172
172
173
173
/* ***************************************/
174
174
175
- extern (C++ )
175
+ extern (C++ ) @system
176
176
{
177
177
struct S6
178
178
{
@@ -182,7 +182,7 @@ extern(C++)
182
182
S6 foo6 ();
183
183
}
184
184
185
- extern (C ) int foosize6();
185
+ extern (C ) int foosize6() @system ;
186
186
187
187
void test6 ()
188
188
{
@@ -201,7 +201,7 @@ version (Posix)
201
201
202
202
/* ***************************************/
203
203
204
- extern (C ) int foo7();
204
+ extern (C ) int foo7() @system ;
205
205
206
206
struct S
207
207
{
@@ -217,7 +217,7 @@ void test7()
217
217
218
218
/* ***************************************/
219
219
220
- extern (C++ ) void foo8(const char * );
220
+ extern (C++ ) void foo8(const char * ) @system ;
221
221
222
222
void test8 ()
223
223
{
@@ -235,7 +235,7 @@ version (Posix)
235
235
236
236
struct elem9 { }
237
237
238
- extern (C++ ) void foobar9(elem9* , elem9* );
238
+ extern (C++ ) void foobar9(elem9* , elem9* ) @system ;
239
239
240
240
void test9 ()
241
241
{
@@ -251,7 +251,7 @@ version (Posix)
251
251
/* ***************************************/
252
252
// https://issues.dlang.org/show_bug.cgi?id=5148
253
253
254
- extern (C++ )
254
+ extern (C++ ) @system
255
255
{
256
256
void foo10 (const char * , const char * );
257
257
void foo10 (const int , const int );
@@ -277,7 +277,7 @@ void test10()
277
277
}
278
278
279
279
// https://issues.dlang.org/show_bug.cgi?id=19504
280
- extern (C++ ) struct Class19504 {
280
+ extern (C++ ) @system struct Class19504 {
281
281
pragma (mangle, " HOHOHO" )
282
282
~this ();
283
283
}
@@ -324,7 +324,7 @@ version (Posix)
324
324
class Expression ;
325
325
struct Loc {}
326
326
327
- extern (C++ )
327
+ extern (C++ ) @system
328
328
class CallExp
329
329
{
330
330
static void test11696a (Loc, Expression, Expression);
@@ -344,13 +344,13 @@ version (Posix)
344
344
/* *************************************/
345
345
// https://issues.dlang.org/show_bug.cgi?id=13337
346
346
347
- extern (C++ , N13337a.N13337b.N13337c)
347
+ extern (C++ , N13337a.N13337b.N13337c) @system
348
348
{
349
349
struct S13337 {}
350
350
void foo13337 (S13337 s);
351
351
}
352
352
353
- extern (C++ , ` N13337a` , ` N13337b` , ` N13337c` )
353
+ extern (C++ , ` N13337a` , ` N13337b` , ` N13337c` ) @system
354
354
{
355
355
struct S13337_2 {}
356
356
void foo13337_2 (S13337 s);
@@ -367,7 +367,7 @@ version (Posix)
367
367
/* *************************************/
368
368
// https://issues.dlang.org/show_bug.cgi?id=15789
369
369
370
- extern (C++ ) void test15789a(T... )(T args);
370
+ extern (C++ ) void test15789a(T... )(T args) @system ;
371
371
372
372
void test15789 ()
373
373
{
@@ -377,7 +377,7 @@ void test15789()
377
377
/* *************************************/
378
378
// https://issues.dlang.org/show_bug.cgi?id=7030
379
379
380
- extern (C++ )
380
+ extern (C++ ) @system
381
381
{
382
382
struct Struct7030
383
383
{
@@ -398,7 +398,7 @@ version (Posix)
398
398
399
399
// Special cases of Itanium mangling
400
400
401
- extern (C++ , std)
401
+ extern (C++ , std) @system
402
402
{
403
403
struct pair (T1 , T2 )
404
404
{
@@ -441,7 +441,7 @@ extern (C++, std)
441
441
struct test18957 {}
442
442
}
443
443
444
- extern (C++ , ` std` )
444
+ extern (C++ , ` std` ) @system
445
445
{
446
446
struct pair (T1 , T2 )
447
447
{
@@ -484,7 +484,7 @@ extern (C++, `std`)
484
484
struct Struct18957 {}
485
485
}
486
486
487
- extern (C++ )
487
+ extern (C++ ) @system
488
488
{
489
489
// Nspace
490
490
std.allocator ! int func_18957_1 (std.allocator ! (int )* v);
@@ -493,7 +493,7 @@ extern(C++)
493
493
X func_18957_2 (X)(X* v);
494
494
}
495
495
496
- extern (C++ )
496
+ extern (C++ ) @system
497
497
{
498
498
void func_20413 (pair! (int , float ), pair! (float , int ));
499
499
}
@@ -558,7 +558,7 @@ version (Posix) // all non-Windows machines
558
558
/* *************************************/
559
559
// https://issues.dlang.org/show_bug.cgi?id=15388
560
560
561
- extern (C++ ) void test15388(typeof (null ));
561
+ extern (C++ ) void test15388(typeof (null )) @system ;
562
562
563
563
version (Posix )
564
564
{
@@ -572,16 +572,16 @@ version (Windows)
572
572
/* *************************************/
573
573
// https://issues.dlang.org/show_bug.cgi?id=14086
574
574
575
- extern (C++ ) class Test14086
575
+ extern (C++ ) @system class Test14086
576
576
{
577
577
this ();
578
578
~this ();
579
579
}
580
- extern (C++ ) class Test14086_2
580
+ extern (C++ ) @system class Test14086_2
581
581
{
582
582
final ~this ();
583
583
}
584
- extern (C++ ) struct Test14086_S
584
+ extern (C++ ) @system struct Test14086_S
585
585
{
586
586
this (int );
587
587
~this ();
@@ -615,7 +615,7 @@ version(Win64)
615
615
/* *************************************/
616
616
// https://issues.dlang.org/show_bug.cgi?id=18888
617
617
618
- extern (C++ )
618
+ extern (C++ ) @system
619
619
struct T18888 (T)
620
620
{
621
621
void fun ();
@@ -682,7 +682,7 @@ version (Win64)
682
682
/* *************************************/
683
683
// https://issues.dlang.org/show_bug.cgi?id=18891
684
684
685
- extern (C++ ) class C18891
685
+ extern (C++ ) @system class C18891
686
686
{
687
687
~this ();
688
688
extern (C++ ) struct Agg
@@ -711,7 +711,7 @@ version (Win64)
711
711
/* *************************************/
712
712
// Test C++ operator mangling
713
713
714
- extern (C++ ) struct TestOperators
714
+ extern (C++ ) @system struct TestOperators
715
715
{
716
716
int opCast (T)();
717
717
int opBinary (string op)(int x);
@@ -894,7 +894,7 @@ version(Windows)
894
894
895
895
// https://issues.dlang.org/show_bug.cgi?id=16479
896
896
// Missing substitution while mangling C++ template parameter for functions
897
- version (Posix ) extern (C++ )
897
+ version (Posix ) extern (C++ ) @system
898
898
{
899
899
// Make sure aliases are still resolved
900
900
alias Alias16479 = int ;
@@ -1068,23 +1068,23 @@ version (Posix) extern (C++)
1068
1068
// https://issues.dlang.org/show_bug.cgi?id=19278
1069
1069
// extern(C++, "name") doesn't accept expressions
1070
1070
1071
- extern (C++ , " hello" ~ " world" )
1071
+ extern (C++ , " hello" ~ " world" ) @system
1072
1072
{
1073
1073
void test19278 ();
1074
1074
}
1075
1075
enum NS = " lookup" ;
1076
- extern (C++ , (NS ))
1076
+ extern (C++ , (NS )) @system
1077
1077
{
1078
1078
void test19278_2 ();
1079
1079
}
1080
1080
alias AliasSeq (Args... ) = Args;
1081
1081
alias Tup = AliasSeq! (" hello" , " world" );
1082
- extern (C++ , (Tup))
1082
+ extern (C++ , (Tup)) @system
1083
1083
{
1084
1084
void test19278_3 ();
1085
1085
__gshared size_t test19278_var;
1086
1086
}
1087
- extern (C++ , (AliasSeq! (Tup, " yay" )))
1087
+ extern (C++ , (AliasSeq! (Tup, " yay" ))) @system
1088
1088
{
1089
1089
void test19278_4 ();
1090
1090
}
@@ -1114,7 +1114,7 @@ version(Posix)
1114
1114
else version (Windows )
1115
1115
enum __c_wchar_t : wchar ;
1116
1116
alias wchar_t = __c_wchar_t;
1117
- extern (C++ ) void test_char_mangling(char , wchar , dchar , wchar_t);
1117
+ extern (C++ ) void test_char_mangling(char , wchar , dchar , wchar_t) @system ;
1118
1118
version (Posix )
1119
1119
{
1120
1120
static assert (test_char_mangling.mangleof == " _Z18test_char_manglingcDsDiw" );
@@ -1128,14 +1128,14 @@ version (Win64)
1128
1128
version (Posix )
1129
1129
{
1130
1130
extern (C++ , PR10021_NS) struct PR10021_Struct (T){}
1131
- extern (C++ ) void PR10021_fun(int i)(PR10021_Struct! int );
1131
+ extern (C++ ) void PR10021_fun(int i)(PR10021_Struct! int ) @system ;
1132
1132
static assert (PR10021_fun! 0. mangleof == ` _Z11PR10021_funILi0EEvN10PR10021_NS14PR10021_StructIiEE` );
1133
1133
}
1134
1134
1135
1135
// https://github.com/dlang/dmd/pull/10021#discussion_r294095749
1136
1136
version (Posix )
1137
1137
{
1138
- extern (C++ , " a" , " b" )
1138
+ extern (C++ , " a" , " b" ) @system
1139
1139
struct PR10021_Struct2
1140
1140
{
1141
1141
void func ();
@@ -1149,17 +1149,17 @@ version (Posix)
1149
1149
version (Posix )
1150
1150
{
1151
1151
extern (C++ , ` ns20022` ) enum Enum20022_1 { A = 1 , }
1152
- extern (C++ ) void fun20022_1(Enum20022_1);
1153
- extern (C++ , ` ns20022` ) void fun20022_2(Enum20022_1);
1152
+ extern (C++ ) void fun20022_1(Enum20022_1) @system ;
1153
+ extern (C++ , ` ns20022` ) void fun20022_2(Enum20022_1) @system ;
1154
1154
1155
- extern (C++ , ns20022)
1155
+ extern (C++ , ns20022) @system
1156
1156
{
1157
1157
enum Enum20022_2 { A = 1 , }
1158
1158
void fun20022_5 (Enum20022_1);
1159
1159
void fun20022_6 (Enum20022_2);
1160
1160
}
1161
- extern (C++ ) void fun20022_3(Enum20022_2);
1162
- extern (C++ , ` ns20022` ) void fun20022_4(Enum20022_2);
1161
+ extern (C++ ) void fun20022_3(Enum20022_2) @system ;
1162
+ extern (C++ , ` ns20022` ) void fun20022_4(Enum20022_2) @system ;
1163
1163
1164
1164
static assert (fun20022_1.mangleof == ` _Z10fun20022_1N7ns2002211Enum20022_1E` );
1165
1165
static assert (fun20022_2.mangleof == ` _ZN7ns2002210fun20022_2ENS_11Enum20022_1E` );
@@ -1179,14 +1179,14 @@ version (Posix)
1179
1179
alias V20094 = xvector20094! (ubyte );
1180
1180
}
1181
1181
1182
- extern (C++ ) void test20094(xvector20094! (V20094 )* v);
1182
+ extern (C++ ) void test20094(xvector20094! (V20094 )* v) @system ;
1183
1183
static assert (test20094.mangleof == ` _Z9test20094PN7ns2009412xvector20094INS0_IhEEEE` );
1184
1184
}
1185
1185
1186
1186
// https://issues.dlang.org/show_bug.cgi?id=20223
1187
1187
version (Posix )
1188
1188
{
1189
- extern (C++ )
1189
+ extern (C++ ) @system
1190
1190
{
1191
1191
int test20223_1 (T)(int function (const (T)* value));
1192
1192
int test20223_2 (T)(int function (ref const (T) value));
@@ -1212,8 +1212,8 @@ version (Posix)
1212
1212
// https://issues.dlang.org/show_bug.cgi?id=20224
1213
1213
version (Posix )
1214
1214
{
1215
- extern (C++ ) public int test20224_1(T)(set20224! T set); // ok
1216
- extern (C++ ) public int test20224_2(T)(ref set20224! T set); // segfault
1215
+ extern (C++ ) public int test20224_1(T)(set20224! T set) @system ; // ok
1216
+ extern (C++ ) public int test20224_2(T)(ref set20224! T set) @system ; // segfault
1217
1217
1218
1218
extern (C++ ) struct set20224 (T)
1219
1219
{
@@ -1235,19 +1235,19 @@ version (Posix)
1235
1235
version (Posix )
1236
1236
{
1237
1237
extern (C++ ) struct Loc2 {};
1238
- extern (C++ ) class FuncDeclaration
1238
+ extern (C++ ) @system class FuncDeclaration
1239
1239
{
1240
1240
static FuncDeclaration create (ref const Loc2, ref const Loc2);
1241
1241
};
1242
- extern (C++ ) FuncDeclaration FuncDeclaration_create(ref const Loc2, ref const Loc2);
1242
+ extern (C++ ) FuncDeclaration FuncDeclaration_create(ref const Loc2, ref const Loc2) @system ;
1243
1243
1244
1244
static assert (FuncDeclaration_create.mangleof == ` _Z22FuncDeclaration_createRK4Loc2S1_` );
1245
1245
static assert (FuncDeclaration.create.mangleof == ` _ZN15FuncDeclaration6createERK4Loc2S2_` );
1246
1246
}
1247
1247
1248
1248
enum Enum19542 = func19542! (int ).mangleof;
1249
1249
1250
- extern (C++ , ` bar` )
1250
+ extern (C++ , ` bar` ) @system
1251
1251
{
1252
1252
void func19542 (T)();
1253
1253
}
0 commit comments