From: Piotr Trojanek Date: Fri, 27 Nov 2020 14:01:27 +0000 (+0100) Subject: [Ada] Fix integer-vs-float errors in example for Test_Case pragma X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0d40c5c325e39f2c9365dafd86850d089eea118;p=gcc.git [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. --- diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index f8a62a57278..74b97181a19 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 401d625000f..02e821936cb 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