diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-07-31 00:41:06 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-07-31 00:41:06 +0200 |
commit | 907ac2de82986cbb6bdc1e5f5b7fcbe35f8775fe (patch) | |
tree | 1c9b485c7bb05afb4c23ae25887ff1a3edd7dcb9 | |
parent | e1bba1a903581fe7f7fa187e76bf37bf96efde7a (diff) | |
parent | b5b4cd3e13db117d593b50b432133847554adfc4 (diff) | |
download | sparse-907ac2de82986cbb6bdc1e5f5b7fcbe35f8775fe.tar.gz |
Merge branch 'undef-option'
-rw-r--r-- | options.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -782,6 +782,12 @@ static char **handle_switch_s(const char *arg, char **next) static char **handle_switch_U(char *arg, char **next) { const char *name = arg + 1; + + if (*name == '\0') { + name = *++next; + if (!name) + die("argument to `-U' is missing"); + } add_pre_buffer("#undef %s\n", name); return next; } |