summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2014-11-15 21:00:16 -0500
committerFather Chrysostomos <sprout@cpan.org>2014-11-15 22:17:42 -0800
commitf8d5a52263698f3448751c5ac18d2b5edac28b36 (patch)
tree19b0723c7099256a9d5e6591d9100c4739fc131f /embed.h
parentc1f06047c0ded9ef04cacab9735c6c65fa803b18 (diff)
downloadperl-f8d5a52263698f3448751c5ac18d2b5edac28b36.tar.gz
readd noreturn and silence "noreturn that returns" warning on MSVC
Based on commit 73758d77 (by me), in commit 117af67d629 more things got noreturn removed on MSVC. See also ML post "(Hugmeir) Re: [perl.git] branch blead, updated. v5.21.0-377-gdc3bf40" This caused a measurable increase in machine code size in 117af67d629 . In commit 73758d77 , the reason there was no increase is Perl_magic_regdatum_set is called only through a magic vtable. Optimizing this to noreturn is forbidden unless the struct member type specifies it (and it obviously doesn't, since this is the magic vtable). The other not-noreturn on MSVC function, Perl_screaminstr, has no core usage (its only reference is in the export table) or CPAN grep usage so therefore it is being removed. It was made fatal in commit 9e3f0d16db . before .text section of perl521.dll on VC 2003 32b, 0xc66a3 bytes, after 0xc6453
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/embed.h b/embed.h
index 32ef097aa7..7fddb5d229 100644
--- a/embed.h
+++ b/embed.h
@@ -117,6 +117,10 @@
#define debstackptrs() Perl_debstackptrs(aTHX)
#define delimcpy Perl_delimcpy
#define despatch_signals() Perl_despatch_signals(aTHX)
+#ifndef PERL_IMPLICIT_CONTEXT
+#define die Perl_die
+#endif
+#define die_sv(a) Perl_die_sv(aTHX_ a)
#define do_binmode(a,b,c) Perl_do_binmode(aTHX_ a,b,c)
#define do_close(a,b) Perl_do_close(aTHX_ a,b)
#define do_gv_dump(a,b,c,d) Perl_do_gv_dump(aTHX_ a,b,c,d)
@@ -750,16 +754,6 @@
#if !(defined(NO_MATHOMS))
#define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
#endif
-#if !(defined(_MSC_VER))
-#ifndef PERL_IMPLICIT_CONTEXT
-#define die Perl_die
-#endif
-#define die_sv(a) Perl_die_sv(aTHX_ a)
-#define screaminstr(a,b,c,d,e,f) Perl_screaminstr(aTHX_ a,b,c,d,e,f)
-# if defined(PERL_IMPLICIT_CONTEXT)
-#define die_nocontext Perl_die_nocontext
-# endif
-#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
#define my_bzero Perl_my_bzero
#endif
@@ -805,6 +799,7 @@
#if defined(PERL_IMPLICIT_CONTEXT)
#define croak_nocontext Perl_croak_nocontext
#define deb_nocontext Perl_deb_nocontext
+#define die_nocontext Perl_die_nocontext
#define form_nocontext Perl_form_nocontext
#define fprintf_nocontext Perl_fprintf_nocontext
#define load_module_nocontext Perl_load_module_nocontext
@@ -817,9 +812,6 @@
#define sv_setpvf_nocontext Perl_sv_setpvf_nocontext
#define warn_nocontext Perl_warn_nocontext
#define warner_nocontext Perl_warner_nocontext
-# if defined(_MSC_VER)
-#define die_nocontext Perl_die_nocontext
-# endif
#endif
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
#define _new_invlist_C_array(a) Perl__new_invlist_C_array(aTHX_ a)
@@ -896,13 +888,6 @@
#define do_spawn(a) Perl_do_spawn(aTHX_ a)
#define do_spawn_nowait(a) Perl_do_spawn_nowait(aTHX_ a)
#endif
-#if defined(_MSC_VER)
-#ifndef PERL_IMPLICIT_CONTEXT
-#define die Perl_die
-#endif
-#define die_sv(a) Perl_die_sv(aTHX_ a)
-#define screaminstr(a,b,c,d,e,f) Perl_screaminstr(aTHX_ a,b,c,d,e,f)
-#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
#define av_reify(a) Perl_av_reify(aTHX_ a)
#define current_re_engine() Perl_current_re_engine(aTHX)