From 49bc45ed256f2d4d68ddab6868a2de06a67647be Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 9 Mar 2018 12:45:10 +0100 Subject: Do not transfer arguments for annotations. In order to ensure that no transformation for arguments to builtin annotations are used, the original unchanged arguments are used. Bug 23179 --- cparser/StructPassing.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cparser/StructPassing.ml') diff --git a/cparser/StructPassing.ml b/cparser/StructPassing.ml index e431d9f9..10aa6fd5 100644 --- a/cparser/StructPassing.ml +++ b/cparser/StructPassing.ml @@ -323,10 +323,13 @@ and transf_call env ctx opt_lhs fn args ty = | None -> e | Some lhs -> eassign lhs e in match fn with - | {edesc = EVar { C.name = "__builtin_va_arg" - | "__builtin_annot" + | {edesc = EVar { C.name = "__builtin_annot" | "__builtin_annot_intval" | "__builtin_ais_annot" } } -> + (* Do not transform the call in this case, just use the default + pass-by-reference mode for struct/union arguments. *) + opt_eassign {edesc = ECall(fn, args); etyp = ty} + | {edesc = EVar { C.name = "__builtin_va_arg" } } -> (* Do not transform the call in this case, just use the default pass-by-reference mode for struct/union arguments. *) opt_eassign {edesc = ECall(fn, args'); etyp = ty} -- cgit