On Saturday, 31 May 2014 at 22:54:48 UTC, Qox wrote: >> scope(exit) foo(); > > uses exception handling in the background. That just works with dmd even in the bare metal environmnet. Throwing an exception needs library support with dmd but you can copy/paste it from druntime - I did that in my minimal.zip.