# New Ticket Created by Jarkko Hietaniemi # Please include the string: [perl #15805] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15805 >
Please find attached some very minor tweaks to keep the Tru64 compiler content and happy about missing return statements in non-void functions. There were some further grumblings that I didn't attempt to fix since I don't know enough Parrotlore: are there, for example, some macros to do generic integer-to-pointer and back casts? In the Old Lore these were known as INT2PTR() and PTR2[IU]V(). Or maybe the warnings unearthed some real problems? The remaining warnings are: cc: Warning: coroutine.pmc, line 329: In the initializer for co, the referenced type of the pointer value "(struct Parrot_Sub ...)pmc->data" is "struct Parrot_Sub", which is not compatible with "struct Parrot_Coroutine". (ptrmismatch) struct Parrot_Coroutine* co = (struct Parrot_Sub*)pmc->data; -----------------------------------^ cc: Warning: coroutine.pmc, line 333: In this statement, "co->init" of type "pointer to long", is being converted to "long". (cvtdiftypes) return co->init; --------------^ cc: Warning: coroutine.pmc, line 336: In this statement, "co->resume" of type "pointer to long", is being converted to "long". (cvtdiftypes) return co->resume; ------------^ cc: Warning: sub.pmc, line 331: In this statement, "((struct Parrot_Sub ...)pmc->data)->init" of type "pointer to long", is being converted to "long". (cvtdiftypes) return ((struct Parrot_Sub*)pmc->data)->init; ------------^ -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen -- attachment 1 ------------------------------------------------------ url: http://rt.perl.org/rt2/attach/31943/26605/60fb43/tru64warn.patch
diff -ruN parrot/classes/perlarray.pmc parrot+fix/classes/perlarray.pmc --- parrot/classes/perlarray.pmc 2002-07-18 05:19:16.000000000 +0300 +++ parrot+fix/classes/perlarray.pmc 2002-07-29 18:20:43.000000000 +0300 @@ -871,9 +871,11 @@ } INTVAL is_equal_keyed (KEY* key, PMC* value, KEY* value_key) { + return 0; } INTVAL is_equal_keyed_int (INTVAL* key, PMC* value, INTVAL* value_key) { + return 0; } void logical_or (PMC* value, PMC* dest) { diff -ruN parrot/classes/perlstring.pmc parrot+fix/classes/perlstring.pmc --- parrot/classes/perlstring.pmc 2002-07-18 05:41:25.000000000 +0300 +++ parrot+fix/classes/perlstring.pmc 2002-07-29 18:22:23.000000000 +0300 @@ -472,6 +472,7 @@ INTVAL cmp_num(PMC* value) { /* XXX: need to add this, but there's no way to get to it from * Parrot assembly, so it can wait. */ + return 0; } void repeat (PMC* value, PMC* dest) { diff -ruN parrot/runops_cores.c parrot+fix/runops_cores.c --- parrot/runops_cores.c 2002-05-20 04:28:32.000000000 +0300 +++ parrot+fix/runops_cores.c 2002-07-29 18:29:25.000000000 +0300 @@ -54,6 +54,7 @@ #else fprintf(stderr, "Computed goto unavailable in this configuration.\n"); exit(1); + return 0; #endif }