This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
HP cc can't handle NOT_REACHED
authorKarl Williamson <khw@cpan.org>
Fri, 16 Oct 2020 03:30:28 +0000 (21:30 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 16 Oct 2020 03:40:52 +0000 (21:40 -0600)
Like solaris, trying to give the hint to the compiler that we know this
area of the code is unreachable, merely results in the warning we were
trying to suppress.  So turn it off.

perl.h

diff --git a/perl.h b/perl.h
index 28fcd0b..f69da26 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3825,7 +3825,7 @@ intrinsic function, see its documents for more details.
 #  endif
 #endif
 
-#if defined(__sun)
+#if defined(__sun) || (defined(__hpux) && !defined(__GNUC__))
 #  ifndef ASSUME
 #    define ASSUME(x)      /* ASSUME() generates warnings on Solaris */
 #  endif