diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-03 22:51:11 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-20 14:28:01 +0100 |
commit | 2fe3af2334733053ba7c0911647e9ba4b16cef55 (patch) | |
tree | 33240a4c7bee8bb3679e3b02419cc0197a93d4cf | |
parent | bb1bf748580d1794f8da7200ba83ccfc2f2f3a8a (diff) | |
download | sparse-2fe3af2334733053ba7c0911647e9ba4b16cef55.tar.gz |
cgcc: -MF, -MQ & -MT need an argument
These flags expect an argument. So, the following element in
'@ARGV' must then not be considered as an option or an input file,
exactly like done for '-o FILE'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-x | cgcc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -31,10 +31,10 @@ while (@ARGV) { # Ditto for stdin. $do_check = 1 if $_ eq '-'; - if ($_ eq '-o') { - # Need to be checked explicitly since '-o -' is - # sometimes used and the '-' would otherwise be - # processed as an option. + if (/^-(o|MF|MT|MQ)$/) { + # Need to be checked explicitly since otherwise + # the argument would be processed as a + # (non-existant) source file or as an option. die ("$0: missing argument for $_") if !@ARGV; $nargs = 1; } |