# New Ticket Created by Steve Peters # Please include the string: [perl #44845] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44845 >
Solaris CC is a bit more sensative than g++ in three cases. First, making sure that arguments have the correct type. Second, making sure that that return type is correct. Finally, functions that return something, must return. The attached patch fixes these things. Steve Peters [EMAIL PROTECTED]
--- src/encoding.c.old Wed Aug 22 08:15:22 2007 +++ src/encoding.c Wed Aug 22 08:15:58 2007 @@ -105,6 +105,7 @@ { UNUSED(encodingname); real_exception(interp, NULL, UNIMPLEMENTED, "Can't load encodings yet"); + return NULL; } /* --- src/interpreter.c.old Wed Aug 22 08:16:48 2007 +++ src/interpreter.c Wed Aug 22 08:17:39 2007 @@ -692,6 +692,7 @@ PIO_eprintf(interp, "Computed goto unavailable in this configuration.\n"); Parrot_exit(interp, 1); + return pc; #endif } --- src/string.c.old Wed Aug 22 08:14:21 2007 +++ src/string.c Wed Aug 22 08:14:50 2007 @@ -2262,7 +2262,7 @@ enc_char = "ascii"; /* check for encoding: */ - p = strchr(enc_char, ':'); + p = (char *)strchr(enc_char, ':'); if (p) { *p = '\0'; --- src/ops/math.ops.old Wed Aug 22 08:43:16 2007 +++ src/ops/math.ops Wed Aug 22 08:42:46 2007 @@ -432,7 +432,7 @@ real_exception(interp, NULL, E_ZeroDivisionError, "Divide by zero"); - f = floor($1 / den); + f = floor((FLOATVAL)$1 / den); $1 = (INTVAL)f; goto NEXT(); } @@ -454,7 +454,7 @@ real_exception(interp, NULL, E_ZeroDivisionError, "Divide by zero"); - f = floor($2 / den); + f = floor((FLOATVAL)$2 / den); $1 = (INTVAL)f; goto NEXT(); } --- src/ops/experimental.ops.old Wed Aug 22 08:40:58 2007 +++ src/ops/experimental.ops Wed Aug 22 08:38:34 2007 @@ -139,8 +139,8 @@ yk = ykp1; } $1 = r1; - $2 = (INTVAL)(xk * pow(-1, n)); - $3 = (INTVAL)(yk * pow(-1, n+1)); + $2 = (INTVAL)(xk * pow(-1, (FLOATVAL)n)); + $3 = (INTVAL)(yk * pow(-1, (FLOATVAL)n+1)); x = $2 * $4; y = $3 * $5;