From 5f9b6873499882d32280883edaa97d7d0f526035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 30 Jan 2019 15:19:07 +0100 Subject: Eliminate bogus warning when using tuple calls There would be a bogus warning when compiling the following function with the `tuple_calls` option: dispatch(X) -> (list_to_atom("prefix_" ++ atom_to_list(suffix))):doit(X). The warning would look like this: no_file: this expression will fail with a 'badarg' exception https://bugs.erlang.org/browse/ERL-838 --- lib/compiler/src/v3_core.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/compiler/src/v3_core.erl') diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index c9517c3e51..27131bc3ab 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -2626,7 +2626,8 @@ cfun(#ifun{anno=A,id=Id,vars=Args,clauses=Lcs,fc=Lfc}, _As, St0) -> [],A#a.us,St2}. c_call_erl(Fun, Args) -> - cerl:c_call(cerl:c_atom(erlang), cerl:c_atom(Fun), Args). + As = [compiler_generated], + cerl:ann_c_call(As, cerl:c_atom(erlang), cerl:c_atom(Fun), Args). %% lit_vars(Literal) -> [Var]. -- cgit v1.2.3