From a0d40c5c325e39f2c9365dafd86850d089eea118 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 27 Nov 2020 15:01:27 +0100 Subject: [PATCH] [Ada] Fix integer-vs-float errors in example for Test_Case pragma gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Test_Case): Change integer to float literals. * gnat_rm.texi: Regenerate. --- gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst | 4 ++-- gcc/ada/gnat_rm.texi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index f8a62a5..74b9718 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -6652,8 +6652,8 @@ expression. The following is an example of use within a package spec: function Sqrt (Arg : Float) return Float; pragma Test_Case (Name => "Test 1", Mode => Nominal, - Requires => Arg < 10000, - Ensures => Sqrt'Result < 10); + Requires => Arg < 10000.0, + Ensures => Sqrt'Result < 10.0); ... end Math_Functions; diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 401d625..02e8219 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT Reference Manual , Nov 20, 2020 +GNAT Reference Manual , Dec 11, 2020 AdaCore @@ -8159,8 +8159,8 @@ package Math_Functions is function Sqrt (Arg : Float) return Float; pragma Test_Case (Name => "Test 1", Mode => Nominal, - Requires => Arg < 10000, - Ensures => Sqrt'Result < 10); + Requires => Arg < 10000.0, + Ensures => Sqrt'Result < 10.0); ... end Math_Functions; @end example -- 2.7.4