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

Jonathan M Davis jmdavisProg at gmx.com
Mon Aug 20 11:33:03 PDT 2012

On Monday, August 20, 2012 20:29:05 David Nadlinger wrote:
> On 19 Aug 2012, at 10:25, Iain Buclaw wrote:
> > 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.
> Yes, sure, emitting a warning is fine, even more so if the code is
> known to be live.

Because of -w, there is essentially zero difference between a warning and an 
error except whether everyone sees it or not. They need to be fixed in either 
case. So, if what Kenji did is okay, then it should be neither a warning nor 
an error. If it's not okay, then a warning may be the correct approach, but 
the code will need to be changed regardless.

- Jonathan M Davis

More information about the dmd-internals mailing list