www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23900] New: safe is allowed in inline asm

https://issues.dlang.org/show_bug.cgi?id=23900

          Issue ID: 23900
           Summary:  safe is allowed in inline asm
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mail ernestocastellotti.it

DMD allows using  safe in inline ASM, it should be allowed to mark asm only as
 system and  trusted because allowing  safe causes user confusion.

Example code:

void main()  safe {
    asm  safe {
        nop;
    }
}

This shouldn't compile, only  trusted and  system should be allowed because
there is no way to check the safety of asm inline code

--
May 06 2023