Bug? Please compile the code "DMD32 D Compiler v2.065"

sdvcn sdvcn at 126.com
Sun Apr 13 20:13:30 PDT 2014


"DMD32 D Compiler v2.065
Copyright (c) 1999-2013 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/"

code:


import std.stdio;

int main(string[] argv)
{
	bool  bh ;
	int ll;
	for(size_t n;n<99;n++)
	{
		int a= 5;
		int b = 5;

		auto r = (a != b);		// return r:false

		if(a != b)
		{
			ll = 55;
			bh = false;// Are executed at any time ??????????
			//i+=
			//break;
		}
	}

     writeln("ll:",ll);
	writeln("bh:",bh);
     return 0;
}

return :
ll:0
bh:false



More information about the Digitalmars-d mailing list