[MLton-devel] cvs commit: C codegen cleanup

Stephen Weeks MLton@mlton.org
Thu, 15 May 2003 10:48:50 -0700


> > This seems to be a problem with Real.class.
> 
> I think I've narrowed this down to a gcc bug:

Mea culpa.  We knew about this bug and that's why we had been using
-O1.  On April 28, I changed the Makefile (revision 1.55) to use -O2.
Everything works on my system because I use gcc 2.96.

I've checked in a fix, which forces -O1 to be used when compiling
Real.c, but leaves the -O2 in place for everything else.

Henry mentioned back in Oct 2001 that this might not even be a gcc bug
due to the funny cast in Real_class.

	I looked at the code being generated in the Real_isFinite()
	case with -O2 and although the double is passed on the stack
	(in 64-bit format), the statement
		word1 = ((Word*)&d)[1];
	is being ignored.  The C standard has various warnings as I
	recall about these kinds of funny casts actually requiring no
	specific results, so this could even be legal, or it might
	just be a C bug.


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel