Preprocessor: avoid name clashes with model local variables
parent
056dfeb169
commit
e76dfadc78
|
@ -596,7 +596,9 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
|||
output << ")";
|
||||
}
|
||||
else
|
||||
output << datatree.symbol_table.getName(symb_id);
|
||||
/* We append underscores to avoid name clashes with "g1" or "oo_" (see
|
||||
also ModelTree::writeModelLocalVariables) */
|
||||
output << datatree.symbol_table.getName(symb_id) << "__";
|
||||
break;
|
||||
|
||||
case eModFileLocalVariable:
|
||||
|
|
|
@ -1171,7 +1171,9 @@ ModelTree::writeModelLocalVariables(ostream &output, ExprNodeOutputType output_t
|
|||
if (IS_C(output_type))
|
||||
output << "double ";
|
||||
|
||||
output << symbol_table.getName(id) << " = ";
|
||||
/* We append underscores to avoid name clashes with "g1" or "oo_" (see
|
||||
also VariableNode::writeOutput) */
|
||||
output << symbol_table.getName(id) << "__ = ";
|
||||
// Use an empty set for the temporary terms
|
||||
value->writeOutput(output, output_type);
|
||||
output << ";" << endl;
|
||||
|
|
Loading…
Reference in New Issue