ldc-developers/ldc — pull request #117 by alexrp (2012-06-09 18:46:29+00:00)
Title: Return 0 immediately after printing -version/--version.

Currently, LDC returns a non-zero exit code on a simple invocation like `ldc2 -version` which is absolute nonsense. Several build systems (Waf in particular) use heuristics (this being one of them) to detect whether the found compiler is LDC2, but this currently fails because such an invocation returns an exit code indicating failure.

So, instead of this, I've made `printVersion` exit the process immediately with a zero exit code. I believe this is sensible behavior, as you normally don't invoke a tool with its version argument to do actual work.