diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-23 09:04:04 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-23 09:04:04 +0200 |
commit | e829671ab99a98dca212c6f29d29b952dbc1fa80 (patch) | |
tree | 784c5a3778a32359390c32c0c205d97beb4fbfb9 /cparser/Elab.ml | |
parent | fbac3359c99391e470ae4aae6993a7e67234f704 (diff) | |
download | compcert-e829671ab99a98dca212c6f29d29b952dbc1fa80.tar.gz compcert-e829671ab99a98dca212c6f29d29b952dbc1fa80.zip |
Added types found in cast to Environment.
New types introduced in casts are now inserted into the right
Environment and carried along.
Bug 19614.
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 76a7379c..16e2b298 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1475,7 +1475,7 @@ let elab_expr vararg loc env a = (* 6.5.4 Cast operators *) | CAST ((spec, dcl), SINGLE_INIT a1) -> - let (ty, _) = elab_type loc env spec dcl in + let (ty, env) = elab_type loc env spec dcl in let b1,env = elab env a1 in if not (wrap2 valid_cast loc env b1.etyp ty) then err "illegal cast from %a@ to %a" Cprint.typ b1.etyp Cprint.typ ty; @@ -1484,7 +1484,7 @@ let elab_expr vararg loc env a = (* 6.5.2.5 Compound literals *) | CAST ((spec, dcl), ie) -> - let (ty, _) = elab_type loc env spec dcl in + let (ty, env) = elab_type loc env spec dcl in begin match elab_initializer loc env "<compound literal>" ty ie with | (ty', Some i) -> { edesc = ECompound(ty', i); etyp = ty' },env | (ty', None) -> error "ill-formed compound literal" |