diff --git a/lang/cem/ctest/ctconv/conv.c b/lang/cem/ctest/ctconv/conv.c index dd97525dc..8d6475fa3 100644 --- a/lang/cem/ctest/ctconv/conv.c +++ b/lang/cem/ctest/ctconv/conv.c @@ -99,6 +99,11 @@ t1() { printf("\t\t\t\t\tfloat %f\n",f) ; #endif + printf("Casts from long\n"); + l = 75000; + printf("\tchar %5d, int %d, unsigned short %6o, long %11ld\n", + (char) l,(int) l,(unsigned short)l ,l) ; + #ifndef NOFLOAT printf("From float\n") ; f = 121.5 ; diff --git a/lang/cem/ctest/ctconv/conv.cem.g b/lang/cem/ctest/ctconv/conv.cem.g index 1469bfd1c..edc594e2a 100644 --- a/lang/cem/ctest/ctconv/conv.cem.g +++ b/lang/cem/ctest/ctconv/conv.cem.g @@ -21,6 +21,8 @@ From integer From long char -3, int -3, unsigned 37777777775, long -3 float -3.000000 +Casts from long + char -8, int 75000, unsigned short 22370, long 75000 From float char 121, int 121, unsigned 171, long 121, float 121.500000 char 0, int 0, unsigned 0, long 0, float 0.000100