From b1a059251053a061d98e4b440bfab40ffd8761c7 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 17 Aug 2016 11:05:56 +0200 Subject: Catch attribute excpetion in _Alignas elab The exception Wrong_attr_arg raised is now catched during the translation of the wrong _Alignas attributes. Bug 19568. --- cparser/Elab.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 76f8efdb..1586f142 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"; [] -- cgit