diff --git a/src/plugins/e-acsl/doc/Changelog b/src/plugins/e-acsl/doc/Changelog index f16e51a4b5f8b84f550f2ff910bba1c87eab9ee3..c39c17dad4d2fd4c55539a896a428e0058aec44c 100644 --- a/src/plugins/e-acsl/doc/Changelog +++ b/src/plugins/e-acsl/doc/Changelog @@ -15,6 +15,7 @@ # E-ACSL: the Whole E-ACSL plug-in ############################################################################### +- E-ACSL [2014/03/27] Remove spurious warnings when using type `real`. -* E-ACSL [2014/03/26] Fix bug #1692 about wrong localisation of some messages. - E-ACSL [2014/03/26] Remove a spurious warning when an annotated diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.1.res.oracle index 4e035d9a7643032e1504dda74955f1e355b1fe0d..29bb832ec0d55d3ae59a7ec86a8d2ea20ea1ce4f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.1.res.oracle @@ -6,16 +6,8 @@ [kernel] preprocessing with "gcc -C -E -I. -IFRAMAC_SHARE/e-acsl -DE_ACSL_MACHDEP=x86_32 -IFRAMAC_SHARE/libc FRAMAC_SHARE/e-acsl/memory_model/e_acsl_mmodel.h" tests/e-acsl-runtime/bts1307.i:16:[kernel] warning: Floating-point constant 0.4 is not represented exactly. Will use 0x1.999999999999ap-2. See documentation for option -warn-decimal-float [e-acsl] beginning translation. -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating a real number by a float -tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating a real number by a float -tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating a real number by a float [e-acsl] translation done in project "e-acsl". [value] Analyzing a complete application starting at main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.res.oracle index e67c07e6cc14ef837236c0dbc8bce7ea4b2151e1..464bfd42cf62f5f946cac1add1099c61f8f31d85 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/bts1307.res.oracle @@ -6,12 +6,8 @@ [kernel] preprocessing with "gcc -C -E -I. -IFRAMAC_SHARE/e-acsl -DE_ACSL_MACHDEP=x86_32 -IFRAMAC_SHARE/libc FRAMAC_SHARE/e-acsl/memory_model/e_acsl_mmodel.h" tests/e-acsl-runtime/bts1307.i:16:[kernel] warning: Floating-point constant 0.4 is not represented exactly. Will use 0x1.999999999999ap-2. See documentation for option -warn-decimal-float [e-acsl] beginning translation. -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' -tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:13:[e-acsl] warning: approximating a real number by a float -tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating a real number by a float -tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating type `real' by `long double' tests/e-acsl-runtime/bts1307.i:25:[e-acsl] warning: approximating a real number by a float [e-acsl] translation done in project "e-acsl". [value] Analyzing a complete application starting at main diff --git a/src/plugins/e-acsl/typing.ml b/src/plugins/e-acsl/typing.ml index a1a41887cdc0abe9cc216bced4cb5d31d0ec0896..615d30efd7e59adee38ee97038f998c67bdcc0c4 100644 --- a/src/plugins/e-acsl/typing.ml +++ b/src/plugins/e-acsl/typing.ml @@ -76,10 +76,7 @@ let typ_of_eacsl_typ = function | No_integral (Ltype _) -> Error.not_yet "typing of user-defined logic type" | No_integral (Lvar _) -> Error.not_yet "type variable" | No_integral Linteger -> Mpz.t () - | No_integral Lreal -> - Options.warning ~current:true ~once:true - "approximating type `real' by `long double'"; - TFloat(FLongDouble, []) + | No_integral Lreal -> TFloat(FLongDouble, []) | No_integral (Larrow _) -> Error.not_yet "functional type" let eacsl_typ_of_typ ty = @@ -173,10 +170,7 @@ let generic_typ (which: < f: 'a. 'a * 'a -> 'a >) t = | Ltype _ as ty when Logic_const.is_boolean_type ty -> Mpz.t () | Ltype _ -> Error.not_yet "typing of user-defined logic type" | Lvar _ -> Error.not_yet "type variable" - | Lreal -> - Options.warning ~current:true ~once:true - "approximating type `real' by `long double'"; - TFloat(FLongDouble, []) + | Lreal -> TFloat(FLongDouble, []) | Larrow _ -> Error.not_yet "functional type" in which#f (ty, ty)