cat > bug.d << CODE
import core.vararg;
struct Foo { this(this) {} }
extern(C) void bug(int nargs, ...)
{
va_list ap;
va_start(ap, __va_argsave);
Foo foo;
va_arg(ap, foo);
}
CODE
dmd -c bug.d
----
/usr/include/dmd/druntime/import/core/stdc/stdarg.d(215): Error: 'bug.Foo.__cpctor' is not nothrow
/usr/include/dmd/druntime/import/core/stdc/stdarg.d(205): Error: function 'core.stdc.stdarg.va_arg!(Foo).va_arg' is nothrow yet may throw
bug.d(10): Error: template instance core.stdc.stdarg.va_arg!(Foo) error instantiating
----
Worked with 2.065.0
Introduced by https://github.com/D-Programming-Language/druntime/commit/08c5faccfe1427e7bae5f71f7c511df41f041ef2 with https://github.com/D-Programming-Language/druntime/pull/745
Comment #1 by public — 2014-08-30T14:06:19Z
Have encountered same issue when trying to build vibe.d newsgroup server. Looking at the content of the `stdarg` module it doesn't feel like module-wide `nothrow` is applicable there at all, there are just too many things that can throw indirectly. In my opinion this needs to be reverted and `nothrow` added on per-function basis
Comment #2 by github-bugzilla — 2014-08-30T17:48:07Z