ruby-changes:64816
From: Nobuyoshi <ko1@a...>
Date: Sun, 10 Jan 2021 16:56:35 +0900 (JST)
Subject: [ruby-changes:64816] 34d02631e7 (master): dtoa.c: constified
https://git.ruby-lang.org/ruby.git/commit/?id=34d02631e7 From 34d02631e71209b12abb69d0114601027e485bc9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 10 Jan 2021 16:32:47 +0900 Subject: dtoa.c: constified clang seems to locate never modified local data in the const segment implicitly. diff --git a/missing/dtoa.c b/missing/dtoa.c index 6d91087..6c0d2b8 100644 --- a/missing/dtoa.c +++ b/missing/dtoa.c @@ -842,7 +842,7 @@ pow5mult(Bigint *b, int k) https://github.com/ruby/ruby/blob/trunk/missing/dtoa.c#L842 { Bigint *b1, *p5, *p51; int i; - static int p05[3] = { 5, 25, 125 }; + static const int p05[3] = { 5, 25, 125 }; if ((i = k & 3) != 0) b = multadd(b, p05[i-1], 0); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/