From 7eaaa6aee670b06c427017a9af888d3469e53126 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 9 May 2017 08:40:58 +0200 Subject: 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 --- cparser/Elab.ml | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit