Need to return something when the compiler doesn't know that a
authorNicholas Clark <nick@ccl4.org>
Sat, 26 Mar 2005 00:21:30 +0000 (00:21 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 26 Mar 2005 00:21:30 +0000 (00:21 +0000)
function is "noreturn".

p4raw-id: //depot/perl@24082

mg.c
op.c
scope.c

diff --git a/mg.c b/mg.c
index dfa6fc3..f7300e4 100644 (file)
--- 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 (file)
--- 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 (file)
--- 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