diff options
Diffstat (limited to 'cfrontend/Initializers.v')
-rw-r--r-- | cfrontend/Initializers.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cfrontend/Initializers.v b/cfrontend/Initializers.v index 1b339c18..f180f980 100644 --- a/cfrontend/Initializers.v +++ b/cfrontend/Initializers.v @@ -190,8 +190,8 @@ with transl_init_array (ty: type) (il: initializer_list) (sz: Z) {struct il} : res (list init_data) := match il with | Init_nil => - if zeq sz 0 - then OK nil + if zeq sz 0 then OK nil + else if zle 0 sz then OK (Init_space (sz * sizeof ty) :: nil) else Error (msg "wrong number of elements in array initializer") | Init_cons i1 il' => do d1 <- transl_init ty i1; |