Bug 13530 – [REG 2.066] D Inline Assembler in nothrow function hides errors

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-24T22:02:00Z
Last change time
2015-02-12T13:34:44Z
Keywords
GDC
Assigned to
nobody
Creator
ibuclaw
Depends on
12979

Comments

Comment #0 by ibuclaw — 2014-09-24T22:02:16Z
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
Comment #1 by ibuclaw — 2014-09-28T11:52:40Z
To work around the remainding issue around the relationship DMD has with nothrow and it's own inline assembler, I've had to comment out the following in GDC's extended assembler passes. https://github.com/D-Programming-Language/dmd/pull/4030 Not good.
Comment #2 by ibuclaw — 2015-02-12T11:03:44Z
Comment #3 by k.hara.pg — 2015-02-12T13:34:44Z
(In reply to Iain Buclaw from comment #2) > May have been fixed by > https://github.com/D-Programming-Language/dmd/pull/4033 ? Yes, it is.