From: Nicholas Clark Date: Sat, 26 Mar 2005 00:21:30 +0000 (+0000) Subject: Need to return something when the compiler doesn't know that a X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c8a6f8651424ba778d5280d96c18e950c4efb74;p=p5sagit%2Fp5-mst-13.2.git Need to return something when the compiler doesn't know that a function is "noreturn". p4raw-id: //depot/perl@24082 --- diff --git a/mg.c b/mg.c index dfa6fc3..f7300e4 100644 --- a/mg.c +++ b/mg.c @@ -478,6 +478,11 @@ Perl_magic_regdatum_set(pTHX_ SV *sv, MAGIC *mg) (void)sv; (void)mg; Perl_croak(aTHX_ PL_no_modify); /* NOT REACHED */ +#ifndef HASATTRIBUTE + /* No __attribute__, so the compiler doesn't know that croak never returns + */ + return 0; +#endif } U32 diff --git a/op.c b/op.c index edf300c..8107a84 100644 --- a/op.c +++ b/op.c @@ -4845,6 +4845,11 @@ Perl_oopsCV(pTHX_ OP *o) Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); /* STUB */ (void)o; +#ifndef HASATTRIBUTE + /* No __attribute__, so the compiler doesn't know that croak never returns + */ + return 0; +#endif } OP * diff --git a/scope.c b/scope.c index 9bb89b7..315fdc0 100644 --- a/scope.c +++ b/scope.c @@ -467,7 +467,11 @@ Perl_save_threadsv(pTHX_ PADOFFSET i) { Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl"); (void)i; +#ifndef HASATTRIBUTE + /* No __attribute__, so the compiler doesn't know that croak never returns + */ return 0; +#endif } void