BetterC is so much bugs, is Walter really use it in DMD?

test test at gmail.com
Thu Oct 25 13:12:32 UTC 2018


On Thursday, 25 October 2018 at 13:00:51 UTC, rikki cattermole 
wrote:
> I just compared the assembly, there isn't anything terribly 
> different for Proxy.__dtor being called. So I would say that 
> you have found some corner case bug.
>
> Please try to minimize it + report it to bugzilla 
> (issues.dlang.org).

==============
import core.stdc.stdio;

version(D_BetterC) {
	extern(C) void main() {
		start;
	}
} else {
	void main(){
		start;
	}
}

struct Proxy {
	this(bool i){}
	
	~this() {
		printf("~this(%x)\n", &this) ;
	}
	void opAssign(Proxy other){
		printf("opAssign(this=%x), other=%x\n", &this, &other) ;
	}
}

Proxy proxy;

void start(){
	proxy = getProxy();
}

ref auto getProxy(){
	auto proxy	= Proxy(1);
	return proxy ;
}

version(D_BetterC) extern(C) {
	__gshared int _d_eh_personality(int, int, size_t, void*, void*) 
{ return 0;};
	__gshared void _d_eh_resume_unwind(void*) { return ;};
}
====================

still can not register, please help me to report.




More information about the Digitalmars-d mailing list