File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,22 +41,28 @@ $(GNAME AsmInstructionList):
41
41
42
42
$(P Assembler instructions must be located inside an `asm` block.
43
43
Like functions, `asm` statements must be anotated with adequate function attributes to be compatible with the caller.
44
- Asm statements attributes must be explicitly defined, they are not infered .
44
+ Asm statements attributes must be explicitly defined, they are not inferred .
45
45
)
46
+ $(P `@safe` is not allowed as an attribute, as the compiler does no safety checking of
47
+ assembly statements - use `@trusted` instead.)
46
48
49
+ $(SPEC_RUNNABLE_EXAMPLE_FAIL
47
50
---
48
- void func1 () pure nothrow @safe @nogc
51
+ void ok () pure nothrow @safe @nogc
49
52
{
50
53
asm pure nothrow @trusted @nogc
51
54
{}
52
55
}
53
56
54
- void func2 () @safe @nogc
57
+ void error () @safe @nogc
55
58
{
56
59
asm @nogc // Error: asm statement is assumed to be @system - mark it with '@trusted' if it is not
57
60
{}
61
+ asm @safe @nogc // Deprecation: asm statement cannot be @safe, use @trusted instead
62
+ {}
58
63
}
59
64
---
65
+ )
60
66
61
67
$(H2 $(LNAME2 asminstruction, Asm instruction))
62
68
You can’t perform that action at this time.
0 commit comments