Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
7d8106d9
Commit
7d8106d9
authored
Apr 18, 2019
by
Tristan Le Gall
Browse files
Correction of pattern matching, add TCastE(_,_) to avoid warning
parent
151dfb86
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/e-acsl/interval.ml
View file @
7d8106d9
...
...
@@ -135,7 +135,6 @@ let rec infer t =
let
i1
=
infer
t1
in
let
i2
=
infer
t2
in
Ival
.
bitwise_or
i1
i2
|
TCastE
(
ty
,
t
)
|
Tif
(
_
,
t2
,
t3
)
->
let
i2
=
infer
t2
in
let
i3
=
infer
t3
in
...
...
@@ -197,7 +196,8 @@ let rec infer t =
|
TUpdate
(
_
,_,_
)
|
Ttypeof
_
|
Ttype
_
|
Tempty_set
->
raise
Not_an_integer
|
Tempty_set
|
TCastE
(
_
,_
)
->
raise
Not_an_integer
and
infer_term_lval
(
host
,
offset
as
tlv
)
=
match
offset
with
...
...
src/plugins/e-acsl/typing.ml
View file @
7d8106d9
...
...
@@ -414,20 +414,6 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
|
TLogic_coerce
(
_
,
t
)
->
dup
(
type_term
~
use_gmp_opt
~
arith_operand
?
ctx
t
)
.
ty
|
TCoerceE
(
t1
,
t2
)
->
let
ctx
=
try
let
i
=
Interval
.
infer
t
in
let
i1
=
Interval
.
infer
t1
in
let
i2
=
Interval
.
infer
t2
in
ty_of_interv
?
ctx
(
Ival
.
join
i
(
Ival
.
join
i1
i2
))
with
Interval
.
Not_an_integer
->
Other
in
ignore
(
type_term
~
use_gmp_opt
:
true
~
ctx
t1
);
ignore
(
type_term
~
use_gmp_opt
:
true
~
ctx
t2
);
dup
ctx
|
TAddrOf
tlv
|
TStartOf
tlv
->
(* it is a pointer, but subterms must be typed. *)
...
...
@@ -480,7 +466,8 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
|
TConst
(
LStr
_
|
LWStr
_
|
LReal
_
)
|
Ttypeof
_
|
Ttype
_
|
Tempty_set
->
dup
Other
|
Tempty_set
|
TCastE
(
_
,_
)
->
dup
Other
in
Memo
.
memo
(
fun
t
->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment