[Issue 13589] [git-head] Asm statement could be assumed to nothrow, safe, pure by the enclosing function attribute

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Oct 12 11:05:29 PDT 2014


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

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #13 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Martin Nowak from comment #12)
> The basic problem with this is using inference on something that cannot be
> inferred.
> 
> void seeminglyPure() {
> // ...
> // many lines of code
> // ...
>     asm {
>         // impure instruction
>     }
> }
> 
> Now when someone adds pure to seeminglyPure it would silently break.

You could perhaps get away with inference with naked functions, as they
shouldn't have any high-level code inside.

--


More information about the Digitalmars-d-bugs mailing list