[m-dev.] lcc & long double

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 7 00:20:51 AEDT 2001


Most of the tests that use floating point, i.e.

	tests/general/float_test
	tests/general/string_format_test
	tests/general/bigtest

are failing when the Mercury compiler was built with lcc.
This is because lcc on x86 Linux does not support `long double'
properly.  lcc represents `long double' with 8 bytes, whereas gcc, the
Linux ABI, and hence glibc use 12 bytes.  This breaks all our float
I/O, which is implemented using `printf("%Lf", (long double) ...);' or
equivalent, because lcc passes 8 bytes but the code for printf()
expects 12 bytes.

This is a bug in the Linux lcc, but we might be able to work around it.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list