www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - compiler crash

reply Russell Wilkins <rwilkins grovestarsoftware.com> writes:
The following code used to work fine on 0.106, but crashes dmd 0.108 on 
win xp.


alias void (*FN)();

void myfn() {}

int main (char[][] args)
{
	long l = cast(long)&myfn;  // This causes crash!
	
	return 0;
}
Dec 04 2004
parent "Simon Buchan" <currently no.where> writes:
On Sat, 04 Dec 2004 12:20:06 +0000, Russell Wilkins  
<rwilkins grovestarsoftware.com> wrote:

 alias void (*FN)();
  void myfn() {}
  int main (char[][] args)
 {
 long l = cast(long)&myfn;  // This causes crash!

 return 0;
 }
1.09 gives: bugtest.d(7): Integer constant expression expected instead of &myfn -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up"
Dec 05 2004