summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--function.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/function.c b/function.c
index 8ba2662..76fb73d 100644
--- a/function.c
+++ b/function.c
@@ -1120,9 +1120,15 @@ handle_function (op, stringp)
}
if (count >= 0)
- makefile_fatal (reading_filename, *reading_lineno_ptr,
- "unterminated call to function `%s': missing `%c'",
- function_table[code].name, closeparen);
+ {
+ static const char errmsg[]
+ = "unterminated call to function `%s': missing `%c'";
+ if (reading_filename == 0)
+ fatal (errmsg, function_table[code].name, closeparen);
+ else
+ makefile_fatal (reading_filename, *reading_lineno_ptr, errmsg,
+ function_table[code].name, closeparen);
+ }
/* We found the end; expand the function call. */