Unverified Commit 91db87b1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Forbid some basenames, since they will cause trouble

Closes: preprocessor#62
parent 84d79226
......@@ -418,6 +418,15 @@ main(int argc, char **argv)
pos != string::npos)
basename.erase(pos);
// Forbid some basenames, since they will cause trouble (see preprocessor#62)
set<string> forbidden_basenames = { "T", "y", "x", "params", "steady_state", "it_", "true" };
if (forbidden_basenames.find(basename) != forbidden_basenames.end())
{
cerr << "ERROR: Please use another name for your .mod file. The one you have chosen ("
<< argv[1] << ") conflicts with internal Dynare names." << endl;
exit(EXIT_FAILURE);
}
WarningConsolidation warnings(no_warn);
// Process config file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment