summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-14 20:36:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-14 20:36:13 -0700
commitc8efb29a3575304ed22e7e240885265e0e93ea3d (patch)
tree5f4a56821eb2b1ae32ca0170b5ff6d8e1be964dd
parent4dccf5b31a53bb42b333922243604ca6b1da4214 (diff)
downloadtxr-c8efb29a3575304ed22e7e240885265e0e93ea3d.tar.gz
txr-c8efb29a3575304ed22e7e240885265e0e93ea3d.tar.bz2
txr-c8efb29a3575304ed22e7e240885265e0e93ea3d.zip
Make it a warning only when built-ins redefined.
* eval.c (builtin_reject_test): Issue warnings rather than errors when built-in macros, functions or operators are redefined. For now, we don't provide any way to suppress the warning.
-rw-r--r--eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index eece7f3d..815689f0 100644
--- a/eval.c
+++ b/eval.c
@@ -1947,11 +1947,11 @@ static void builtin_reject_test(val op, val sym, val form)
} else if (opt_compat && opt_compat <= 107) {
/* empty */
} else if (builtin_kind) {
- eval_error(form, lit("~s: cannot bind ~s, which is a built-in ~s"),
- op, sym, builtin_kind, nao);
+ eval_warn(form, lit("~s: redefining ~s, which is a built-in ~s"),
+ op, sym, builtin_kind, nao);
} else if (is_operator) {
- eval_error(form, lit("~s: cannot bind ~s, which is a built-in operator"),
- op, sym, nao);
+ eval_warn(form, lit("~s: redefining ~s, which is a built-in operator"),
+ op, sym, nao);
}
}