diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-14 20:36:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-14 20:36:13 -0700 |
commit | c8efb29a3575304ed22e7e240885265e0e93ea3d (patch) | |
tree | 5f4a56821eb2b1ae32ca0170b5ff6d8e1be964dd | |
parent | 4dccf5b31a53bb42b333922243604ca6b1da4214 (diff) | |
download | txr-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } } |