stage4/generate_c/generate_c.cc
changeset 768 308022f26450
parent 762 a3d917474ae4
child 793 268bf4ca5fa1
--- a/stage4/generate_c/generate_c.cc	Thu Dec 20 10:42:01 2012 +0100
+++ b/stage4/generate_c/generate_c.cc	Thu Dec 20 10:46:51 2012 +0100
@@ -1124,7 +1124,7 @@
   s4o.print(" = ");
   {
     /* get the default value of this variable's type */
-    symbol_c *default_value = (symbol_c *)symbol->type_name->accept(*type_initial_value_c::instance());
+    symbol_c *default_value = type_initial_value_c::get(symbol->type_name);
     if (default_value == NULL) ERROR;
     initialization_analyzer_c initialization_analyzer(default_value);
     switch (initialization_analyzer.get_initialization_type()) {