From: Tom de Vries Date: Mon, 2 Feb 2026 18:22:51 +0000 (+0100) Subject: [gdb/testsuite] Fix pi approximation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5da93b00b3e804723ac8a765b274c6e22df85fca;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix pi approximation In gdb.dap/ada-non-ascii/prog.adb, I came across the following: ... π : Integer := 3; -- The Indiana Approximation. ... This article [1] explains the background behind the comment: the Indiana pi bill. Given that the common interpretation seems to be that the bill implies that π == 3.2 [2]: ... The bill ... has been claimed to imply a number of different values for π, although the closest it comes to explicitly asserting one is the wording "the ratio of the diameter and circumference is as five-fourths to four", which would make π = 16⁄5 = 3.2, ... . ... change the type to float, and set it to 3.2. Luckily, in this particular case, changing the approximation of π has no effect, so the test-case still passes :) . Tested on x86_64-linux. Approved-by: Kevin Buettner [1] https://en.wikipedia.org/wiki/Indiana_pi_bill [2] https://en.wikipedia.org/wiki/Approximations_of_pi#Indiana_bill --- diff --git a/gdb/testsuite/gdb.dap/ada-non-ascii/prog.adb b/gdb/testsuite/gdb.dap/ada-non-ascii/prog.adb index 7853be5eff8..b2885b3759e 100644 --- a/gdb/testsuite/gdb.dap/ada-non-ascii/prog.adb +++ b/gdb/testsuite/gdb.dap/ada-non-ascii/prog.adb @@ -16,7 +16,7 @@ with Pack; use Pack; procedure Prog is - π : Integer := 3; -- The Indiana Approximation. + π : Float := 3.2; -- The Indiana Approximation. φ : constant := 7; -- Not even close. begin Do_Nothing (π'Address); -- BREAK