diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-09 11:07:18 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-09 11:07:18 -0800 |
commit | 0afe5fe6a1a279792194b5ccff317ee131f88f92 (patch) | |
tree | 4eb040f2585f7a44720110bb98ca4ce8c607c8ec /unwind.c | |
parent | e2764d75a52f60ea37f4d7aaa5414cc663e7749f (diff) | |
download | txr-0afe5fe6a1a279792194b5ccff317ee131f88f92.tar.gz txr-0afe5fe6a1a279792194b5ccff317ee131f88f92.tar.bz2 txr-0afe5fe6a1a279792194b5ccff317ee131f88f92.zip |
Muffle only deferrable warnings in sys:expand.
The problem is that if some macrology is performing its own
expansion with sys:expand, and if all warnings are muffled in
sys:expand, it means that some warnings will never be seen.
Expansion is the last chance to produce warnings issued by
macros. Once they are expanded, a redundant expansion pass
won't issue the warnings any more.
* eval.c (no_warn_expand); Use the
uw_muffle_deferrable_warning handler isntead of
uw_muffle_warnings.
* unwind.c (uw_muffle_deferrable_warning): New function.
* unwind.h (uw_muffle_deferrable_warning): Declared.
Diffstat (limited to 'unwind.c')
-rw-r--r-- | unwind.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -428,6 +428,14 @@ val uw_muffle_warning(val exc, struct args *args) uw_throw(continue_s, nil); } +val uw_muffle_deferrable_warning(val exc, struct args *args) +{ + (void) exc; + if (args_count(args) == 2) + uw_throw(continue_s, nil); + return nil; +} + void uw_push_cont_copy(uw_frame_t *fr, mem_t *ptr, void (*copy)(mem_t *ptr, int parent)) { |