In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/555e2b18c04970c0205a348954e3a6f7dc2be19b?hp=5b3e7d5fab3ee4efee810acd1250c5438259bc76>
- Log ----------------------------------------------------------------- commit 555e2b18c04970c0205a348954e3a6f7dc2be19b Author: Father Chrysostomos <spr...@cpan.org> Date: Thu Jul 28 12:55:48 2016 -0700 POSIX.xs: Make NV_PAYLOAD_SIZEOF_ASSERT static so that we get the benefit of the assertions for non-debugging builds but without any run-time penalty. ----------------------------------------------------------------------- Summary of changes: ext/POSIX/POSIX.xs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index a950af3..bb121c3 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1154,9 +1154,11 @@ static NV my_trunc(NV x) #endif #if defined(USE_LONG_DOUBLE) && defined(LONGDOUBLE_DOUBLEDOUBLE) -# define NV_PAYLOAD_SIZEOF_ASSERT(a) assert(sizeof(a) == NVSIZE / 2) +# define NV_PAYLOAD_SIZEOF_ASSERT(a) \ + STATIC_ASSERT_STMT(sizeof(a) == NVSIZE / 2) #else -# define NV_PAYLOAD_SIZEOF_ASSERT(a) assert(sizeof(a) == NVSIZE) +# define NV_PAYLOAD_SIZEOF_ASSERT(a) \ + STATIC_ASSERT_STMT(sizeof(a) == NVSIZE) #endif static void S_setpayload(NV* nvp, NV_PAYLOAD_TYPE payload, bool signaling) -- Perl5 Master Repository