On Tuesday, 17 April 2018 at 00:08:07 UTC, Mike Franklin wrote:
On Monday, 16 April 2018 at 13:40:55 UTC, jmh530 wrote:
On Monday, 16 April 2018 at 13:01:44 UTC, Radu wrote:
A blocker for more advanced 'betterC' usage.

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

From what I can gather this appears to be caused by a `scope(failure)` statement (https://dlang.org/spec/statement.html#scope-guard-statement) being added to the Postblit body (a.k.a. __fieldPostblit internally in the compiler). I'm assuming `scope(failure)` is just syntactic sugar for a try-catch.

I don't know how Walter wants to handle such a situation in -betterC. If I knew, I might be able to fix this bug.

Mike

It should be a no-op under betterC because betterC implies nothrow.
It is odd though since

void foo (){}
extern(C) void main()
{
    scope(exit) foo();
}

compiles and runs with -betterC

Reply via email to