[dmd-internals] Errors emitted by the optimizer and the as-if rule

Marco Leise Marco.Leise at gmx.de
Sun Aug 19 02:34:53 PDT 2012

Am 19.08.2012, 10:25 Uhr, schrieb Iain Buclaw <ibuclaw at ubuntu.com>:

> You can only be certain that a function is never invoked unless it is
> marked 'static' IMO.  My opinion is that it should warn you anyway, as
> it is potentially buggy code, even if unused.

What does static add to the mix?

---- b.d ----
static foo() {
---- a.d ----
import b;
void main() {

Compiled as separate objects, b.foo can still be linked against.

More information about the dmd-internals mailing list