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):
4141
4242 $(P Assembler instructions must be located inside an `asm` block.
4343 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 .
4545 )
46+ $(P `@safe` is not allowed as an attribute, as the compiler does no safety checking of
47+ assembly statements - use `@trusted` instead.)
4648
49+ $(SPEC_RUNNABLE_EXAMPLE_FAIL
4750---
48- void func1 () pure nothrow @safe @nogc
51+ void ok () pure nothrow @safe @nogc
4952{
5053 asm pure nothrow @trusted @nogc
5154 {}
5255}
5356
54- void func2 () @safe @nogc
57+ void error () @safe @nogc
5558{
5659 asm @nogc // Error: asm statement is assumed to be @system - mark it with '@trusted' if it is not
5760 {}
61+ asm @safe @nogc // Deprecation: asm statement cannot be @safe, use @trusted instead
62+ {}
5863}
5964---
65+ )
6066
6167$(H2 $(LNAME2 asminstruction, Asm instruction))
6268
You can’t perform that action at this time.
0 commit comments