--- a/stage4/generate_c/generate_c_vardecl.cc Wed Jul 06 12:01:46 2011 +0200
+++ b/stage4/generate_c/generate_c_vardecl.cc Wed Jul 06 12:19:30 2011 +0200
@@ -163,7 +163,7 @@
s4o.print("(");
print_variable_prefix();
symbol->elements[i]->accept(*this);
- s4o.print(", temp);\n");
+ s4o.print(",temp);\n");
}
return NULL;
}
@@ -918,6 +918,10 @@
this->current_var_type_symbol->accept(*this);
s4o.print(" ");
}
+ else if (wanted_varformat == init_vf) {
+ s4o.print(SET_VAR);
+ s4o.print("(");
+ }
print_variable_prefix();
list->elements[i]->accept(*this);
if (wanted_varformat != local_vf) {
@@ -953,6 +957,11 @@
s4o.print(s4o.indent_spaces);
s4o.print("}\n");
}
+ else if (wanted_varformat == init_vf) {
+ s4o.print(",");
+ this->current_var_init_symbol->accept(*this);
+ s4o.print(");\n");
+ }
else {
if (this->current_var_init_symbol != NULL) {
s4o.print(" = ");