mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Improved error message for options after front-end filename arguments
This commit is contained in:
parent
7020f7fc13
commit
f9c1cd5edb
2 changed files with 5 additions and 1 deletions
|
@ -270,6 +270,10 @@ void Frontend::extra_args(FILE *&f, std::string &filename, std::vector<std::stri
|
|||
if (f == NULL)
|
||||
log_cmd_error("Can't open input file `%s' for reading: %s\n", filename.c_str(), strerror(errno));
|
||||
|
||||
for (size_t i = argidx+1; i < args.size(); i++)
|
||||
if (args[i].substr(0, 1) == "-")
|
||||
cmd_error(args, i, "Found option, expected arguments.");
|
||||
|
||||
if (argidx+1 < args.size()) {
|
||||
next_args.insert(next_args.begin(), args.begin(), args.begin()+argidx);
|
||||
next_args.insert(next_args.begin()+argidx, args.begin()+argidx+1, args.end());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue