diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-06-04 09:10:50 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-06-04 09:10:50 +0200 |
commit | f9c1cd5edba5acb4d9b9dd287c7265111cf22087 (patch) | |
tree | 4aaa54798de819a4a776a41efeb6e99f095473eb /kernel | |
parent | 7020f7fc138ac9bad46f9f2b41150321f315f992 (diff) | |
download | yosys-f9c1cd5edba5acb4d9b9dd287c7265111cf22087.tar.gz yosys-f9c1cd5edba5acb4d9b9dd287c7265111cf22087.tar.bz2 yosys-f9c1cd5edba5acb4d9b9dd287c7265111cf22087.zip |
Improved error message for options after front-end filename arguments
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/register.cc b/kernel/register.cc index 5d882ab43..8da5a725f 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -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()); |