diff options
-rw-r--r-- | cparser/StructPassing.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cparser/StructPassing.ml b/cparser/StructPassing.ml index e431d9f9..10aa6fd5 100644 --- a/cparser/StructPassing.ml +++ b/cparser/StructPassing.ml @@ -323,12 +323,15 @@ 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} | _ -> let call = |