[Issue 13530] New: [REG 2.066] D Inline Assembler in nothrow function hides errors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Sep 24 15:02:16 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13530
Issue ID: 13530
Summary: [REG 2.066] D Inline Assembler in nothrow function
hides errors
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: ibuclaw at gdcproject.org
version (A)
{
void foo(scope void delegate() fn) nothrow
{
fn(); // Error: 'fn' is not nothrow
}
}
else version (B)
{
void foo(scope void delegate() fn) nothrow
{
asm { }
fn(); // Error: 'fn' is not nothrow
}
}
else version (C)
{
void foo(scope void delegate() fn) nothrow
{
asm { nop; }
fn(); // Works !?!
}
}
This sort of weird behaviour is found in druntime.
https://github.com/D-Programming-Language/druntime/blob/dbf3ff2a98208b21ee2d820df2c526af75ace863/src/core/thread.d#L2230
GDC does the right thing and errors, so until:
1) Druntime is fixed
2) DMD is fixed to error as it should
This is a blocker for 2.066
--
More information about the Digitalmars-d-bugs
mailing list