aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-05-09 08:40:58 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2017-05-09 08:40:58 +0200
commit7eaaa6aee670b06c427017a9af888d3469e53126 (patch)
tree5aa81bdb2d648dd114f99725172bab79ecf719cb /cparser
parentac1f753ae43c32ce745c792611def48ca678be63 (diff)
downloadcompcert-7eaaa6aee670b06c427017a9af888d3469e53126.tar.gz
compcert-7eaaa6aee670b06c427017a9af888d3469e53126.zip
Make redefinition of composite a fatal error.
The redefinition of a composite with a different tag type is now a fatal error. This should avoid problems when the composite is used. Bug 21542
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Elab.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 8b38f4c7..60772eec 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -916,8 +916,7 @@ and elab_struct_or_union keep_ty only kind loc tag optmembers attrs env =
(tag', Env.add_composite env' tag' ci')
| Some(tag', {Env.ci_sizeof = Some _}), Some _
when Env.in_current_scope env tag' ->
- error loc "redefinition of struct or union '%s'" tag;
- (tag', env)
+ fatal_error loc "redefinition of struct or union '%s'" tag
| _, None ->
(* declaration of an incomplete struct or union *)
if tag = "" then