|
From: Wesley T. <we...@ml...> - 2006-05-25 08:19:03
|
For whatever reason, casting to char makes the test fail on powerpc linux. This is despite that powerpc linux is in fact signed. I've tested the CHAR_MIN variant with -funsigned-char to make sure it fails, and we already include limits.h, so this seems best. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h 2006-05-25 13:00:37 UTC (rev 4603) +++ mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h 2006-05-25 15:19:00 UTC (rev 4604) @@ -54,7 +54,7 @@ COMPILE_TIME_ASSERT(CHAR_BIT__is_eight, CHAR_BIT == 8); COMPILE_TIME_ASSERT(sizeof_float__is_four, sizeof(float) == 4); COMPILE_TIME_ASSERT(sizeof_double__is_eight, sizeof(double) == 8); -COMPILE_TIME_ASSERT(char__is_signed, (double)((char)(-1)) < 0); +COMPILE_TIME_ASSERT(char__is_signed, CHAR_MIN < 0); #include <fcntl.h> #include <unistd.h> |