From a6c369cbd63996c1571ae601b7d92070f024b22c Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 5 Oct 2013 08:11:34 +0000 Subject: Merge of the "alignas" branch. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2342 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/PrintCsyntax.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cfrontend/PrintCsyntax.ml') diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml index 897a2ee5..ec82869f 100644 --- a/cfrontend/PrintCsyntax.ml +++ b/cfrontend/PrintCsyntax.ml @@ -78,7 +78,11 @@ let struct_unions = ref StructUnion.empty (* Declarator (identifier + type) *) let attributes a = - if attr_volatile a then " volatile" else "" + let s1 = if a.attr_volatile then " volatile" else "" in + match a.attr_alignas with + | None -> s1 + | Some l -> + sprintf " _Alignas(%Ld)%s" (Int64.shift_left 1L (N.to_int l)) s1 let name_optid id = if id = "" then "" else " " ^ id -- cgit