summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTAKAI Kousuke <62541129+t-a-k@users.noreply.github.com>2022-06-15 01:55:36 +0900
committerTony Cook <tony@develop-help.com>2022-07-01 08:26:55 +1000
commitb52cb8576e7432bf7e962089e9e54451381968c8 (patch)
tree5bb0ac3ae070d861f51935ccb32ca5c06dc05afa /t
parent878d0f6b930a6f3a1e01768796d2f7a1b71f9da0 (diff)
downloadperl-b52cb8576e7432bf7e962089e9e54451381968c8.tar.gz
sv.c: Replace a runtime check with compile-time static assertion
The original code used to check U_V(Perl_fabs(SvNVX(sv))) < (UV)IV_MAX in runtime, but possibility of failing this check will imply that such perl configuration is unusable anyway. To make this check never fail, the first non-preserved integer, which is (1 << NV_PRESERVES_UV_BITS), is required to be less than (or equal to) IV_MAX, which can be checked at compile time without runtime overhead.
Diffstat (limited to 't')
-rw-r--r--t/porting/diag.t1
1 files changed, 0 insertions, 1 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t
index 80f7458562..7645a0f0cb 100644
--- a/t/porting/diag.t
+++ b/t/porting/diag.t
@@ -670,7 +670,6 @@ socketpair not implemented!
%s: %s
Starting Full Screen process with flag=%d, mytype=%d
Starting PM process with flag=%d, mytype=%d
-sv_2iv assumed (U_V(Perl_fabs(SvNVX(sv))) < (UV)IV_MAX) but SvNVX(sv)=%f U_V is 0x%x, IV_MAX is 0x%x
switching effective gid is not implemented
switching effective uid is not implemented
System V IPC is not implemented on this machine