aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Elab.ml
diff options
context:
space:
mode:
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r--cparser/Elab.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 16e2b298..f8d2cb77 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -1292,11 +1292,11 @@ if is_function_type env ty_root then begin
error loc "illegal initializer (only variables can be initialized)";
raise Exit
end;
-if wrap incomplete_type loc env ty_root then begin
+try
+ elab_item (I.top env root ty_root) ie []
+with No_default_init ->
error loc "variable has incomplete type %a" Cprint.typ ty_root;
raise Exit
-end;
-elab_item (I.top env root ty_root) ie []
(* Elaboration of a top-level initializer *)