aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Elab.ml
diff options
context:
space:
mode:
authorMichael Schmidt <github@mschmidt.me>2016-08-17 16:32:56 +0200
committerMichael Schmidt <github@mschmidt.me>2016-08-17 16:32:56 +0200
commite0f0f573a4a8fc1f564a31388afa9c23e48bb016 (patch)
treeb7c004b3aae01c79bef8c8914e759a1e3ce358f7 /cparser/Elab.ml
parent18fcf2ffef8b4ba5eb0624b15371e93b4ac88cfe (diff)
parente2b4459ccd1b0f8436cb70a631772d715e642dcd (diff)
downloadcompcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.tar.gz
compcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.zip
fix merge conflicts
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r--cparser/Elab.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 76f8efdb..8cd7ed64 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -433,6 +433,7 @@ let elab_attribute env = function
begin match elab_attr_arg loc env a with
| AInt n when is_power_of_two n -> [AAlignas (Int64.to_int n)]
| _ -> warning loc "bad _Alignas value, ignored"; []
+ | exception Wrong_attr_arg -> warning loc "bad _Alignas value, ignored"; []
end
| ALIGNAS_ATTR (_, loc) ->
warning loc "_Alignas takes exactly one parameter, ignored"; []
@@ -812,7 +813,11 @@ and elab_struct_or_union_info kind loc env members attrs =
check_incomplete m;
(* Warn for empty structs or unions *)
if m = [] then
- warning loc "empty %s" (if kind = Struct then "struct" else "union");
+ if kind = Struct then begin
+ warning loc "empty struct"
+ end else begin
+ fatal_error loc "empty union"
+ end;
(composite_info_def env' kind attrs m, env')
and elab_struct_or_union only kind loc tag optmembers attrs env =