Error: null dereference in function _Dmain
Ali Çehreli
acehreli at yahoo.com
Mon Jul 2 13:27:42 PDT 2012
On 07/02/2012 11:36 AM, Jonathan M Davis wrote:
> By the way, it's pointless to compile with both -w and -wi. -wi makes
it so
> that warnings are displayed without stopping compilation. -w makes it
so that
> warnings are displayed and treated as errors (so they stop
compilation). Pick
> one or the other. I don't know which the compiler picks if you give
it both,
> but it's going to have to pick one or the other, and it may not pick
the one
> that you want.
I have tested this: The one that is specified last on the command line
takes effect:
int main()
{
return 0;
return 0; // Warning: statement is not reachable
}
$ dmd deneme.d # compiles without any diagnostics
$ dmd deneme.d -w # breaks compilation
$ dmd deneme.d -wi -w # ditto
$ dmd deneme.d -wi # warns but compiles
$ dmd deneme.d -w -wi # ditto
Ali
More information about the Digitalmars-d-learn
mailing list