summaryrefslogtreecommitdiff
path: root/proto.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 /proto.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 'proto.h')
-rw-r--r--proto.h58
1 files changed, 14 insertions, 44 deletions
diff --git a/proto.h b/proto.h
index 03a36f0656..656d6b4084 100644
--- a/proto.h
+++ b/proto.h
@@ -904,6 +904,16 @@ PERL_CALLCONV char* Perl_delimcpy(char* to, const char* toend, const char* from,
assert(to); assert(toend); assert(from); assert(fromend); assert(retlen)
PERL_CALLCONV void Perl_despatch_signals(pTHX);
+PERL_CALLCONV_NO_RET OP* Perl_die(pTHX_ const char* pat, ...)
+ __attribute__noreturn__
+ __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
+
+PERL_CALLCONV_NO_RET OP* Perl_die_sv(pTHX_ SV *baseex)
+ __attribute__noreturn__
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_DIE_SV \
+ assert(baseex)
+
PERL_CALLCONV_NO_RET void Perl_die_unwind(pTHX_ SV* msv)
__attribute__noreturn__
__attribute__nonnull__(pTHX_1);
@@ -5232,16 +5242,6 @@ PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *index, size_t size)
#endif
#if !(defined(_MSC_VER))
-PERL_CALLCONV_NO_RET OP* Perl_die(pTHX_ const char* pat, ...)
- __attribute__noreturn__
- __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-
-PERL_CALLCONV_NO_RET OP* Perl_die_sv(pTHX_ SV *baseex)
- __attribute__noreturn__
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DIE_SV \
- assert(baseex)
-
PERL_CALLCONV_NO_RET int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
__attribute__noreturn__
__attribute__nonnull__(pTHX_1)
@@ -5249,20 +5249,6 @@ PERL_CALLCONV_NO_RET int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET \
assert(sv); assert(mg)
-PERL_CALLCONV_NO_RET char* Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
- __attribute__noreturn__
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_SCREAMINSTR \
- assert(bigstr); assert(littlestr); assert(old_posp)
-
-# if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV_NO_RET OP* Perl_die_nocontext(const char* pat, ...)
- __attribute__noreturn__
- __attribute__format__null_ok__(__printf__,1,2);
-
-# endif
#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
PERL_CALLCONV char* Perl_my_bzero(char* loc, I32 len)
@@ -5765,6 +5751,10 @@ PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...)
#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
assert(pat)
+PERL_CALLCONV_NO_RET OP* Perl_die_nocontext(const char* pat, ...)
+ __attribute__noreturn__
+ __attribute__format__null_ok__(__printf__,1,2);
+
PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...)
__attribute__format__(__printf__,1,2)
__attribute__nonnull__(1);
@@ -5841,11 +5831,6 @@ PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...)
#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT \
assert(pat)
-# if defined(_MSC_VER)
-PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...)
- __attribute__format__null_ok__(__printf__,1,2);
-
-# endif
#endif
#if defined(PERL_IMPLICIT_SYS)
PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPerlMem *ipMS, struct IPerlMem *ipMP, struct IPerlEnv *ipE, struct IPerlStdIO *ipStd, struct IPerlLIO *ipLIO, struct IPerlDir *ipD, struct IPerlSock *ipS, struct IPerlProc *ipP)
@@ -8205,27 +8190,12 @@ PERL_CALLCONV int Perl_do_spawn_nowait(pTHX_ char* cmd)
#endif
#if defined(_MSC_VER)
-PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...)
- __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-
-PERL_CALLCONV OP* Perl_die_sv(pTHX_ SV *baseex)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DIE_SV \
- assert(baseex)
-
PERL_CALLCONV int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET \
assert(sv); assert(mg)
-PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_SCREAMINSTR \
- assert(bigstr); assert(littlestr); assert(old_posp)
-
#endif
#ifdef PERL_CORE
# include "pp_proto.h"