Skip to content
Snippets Groups Projects
Verified Commit 91db87b1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Forbid some basenames, since they will cause trouble

Closes: #62
parent 84d79226
Branches
Tags
No related merge requests found
Pipeline #4556 passed
...@@ -418,6 +418,15 @@ main(int argc, char **argv) ...@@ -418,6 +418,15 @@ main(int argc, char **argv)
pos != string::npos) pos != string::npos)
basename.erase(pos); 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); WarningConsolidation warnings(no_warn);
// Process config file // Process config file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment