Skip to content

Commit a76c857

Browse files
committed
Add comment why seemingly dead code is necessary
1 parent c92be3c commit a76c857

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/pl/plperl/plperl.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,15 @@ pp_require_safe(pTHX)
832832
RETPUSHYES;
833833

834834
DIE(aTHX_ "Unable to load %s into plperl", name);
835-
return NULL; /* keep compiler quiet */
835+
/*
836+
* In most Perl versions, DIE() expands to a return statement, so the next
837+
* line is not necessary. But in versions between but not including 5.11.1
838+
* and 5.13.3 it does not, so the next line is necessary to avoid a
839+
* "control reaches end of non-void function" warning from gcc. Other
840+
* compilers such as Solaris Studio will, however, issue a "statement not
841+
* reached" warning instead.
842+
*/
843+
return NULL;
836844
}
837845

838846

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy