aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/compile-layout.c3
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/macro-undefined_macro-call2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c
index cc9719b..0622d35 100644
--- a/src/mds-kbdc/compile-layout.c
+++ b/src/mds-kbdc/compile-layout.c
@@ -2404,7 +2404,8 @@ static int compile_macro_call(mds_kbdc_tree_macro_call_t* restrict tree)
/* Duplicate arguments and evaluate function calls,
variable dereferences and escapes in the macro
call arguments. */
- fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL);
+ if (tree->arguments)
+ fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL);
fail_if (bad = evaluate_element(arg), bad < 0);
if (bad)
return 0;
diff --git a/test-files/mds-kbdc/compile-layout/invalid/macro-undefined_macro-call b/test-files/mds-kbdc/compile-layout/invalid/macro-undefined_macro-call
index 6626ae7..69f2f8e 100644
--- a/test-files/mds-kbdc/compile-layout/invalid/macro-undefined_macro-call
+++ b/test-files/mds-kbdc/compile-layout/invalid/macro-undefined_macro-call
@@ -1,5 +1,3 @@
-# TODO does not work
-
macro m/0
m(1)
end macro