aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/SimplExpr.v
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2015-04-01 18:27:15 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2015-04-01 18:27:15 +0200
commit68e2ce02f8d69b26c9cea6e0d338f855cbea3ace (patch)
tree98acb09c398112bff31ce34c0857aa0f4e9b8e23 /cfrontend/SimplExpr.v
parent5d6febecb8c0f90a627033744f6f62164645a1a4 (diff)
parentdaccc2928e6410c4e8c886ea7d019fd9a071b931 (diff)
downloadcompcert-68e2ce02f8d69b26c9cea6e0d338f855cbea3ace.tar.gz
compcert-68e2ce02f8d69b26c9cea6e0d338f855cbea3ace.zip
Merge pull request #31 from AbsInt/null-ptr-cmp
Revised semantics of comparisons between a pointer and 0.
Diffstat (limited to 'cfrontend/SimplExpr.v')
-rw-r--r--cfrontend/SimplExpr.v3
1 files changed, 2 insertions, 1 deletions
diff --git a/cfrontend/SimplExpr.v b/cfrontend/SimplExpr.v
index 36fe07ae..097dc589 100644
--- a/cfrontend/SimplExpr.v
+++ b/cfrontend/SimplExpr.v
@@ -18,6 +18,7 @@ Require Import Errors.
Require Import Integers.
Require Import Floats.
Require Import Values.
+Require Import Memory.
Require Import AST.
Require Import Ctypes.
Require Import Cop.
@@ -129,7 +130,7 @@ Function eval_simpl_expr (a: expr) : option val :=
Function makeif (a: expr) (s1 s2: statement) : statement :=
match eval_simpl_expr a with
| Some v =>
- match bool_val v (typeof a) with
+ match bool_val v (typeof a) Mem.empty with
| Some b => if b then s1 else s2
| None => Sifthenelse a s1 s2
end