diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-05-09 08:40:58 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-05-09 08:40:58 +0200 |
commit | 7eaaa6aee670b06c427017a9af888d3469e53126 (patch) | |
tree | 5aa81bdb2d648dd114f99725172bab79ecf719cb | |
parent | ac1f753ae43c32ce745c792611def48ca678be63 (diff) | |
download | compcert-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
-rw-r--r-- | cparser/Elab.ml | 3 |
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 |