stage4/generate_c/generate_c.cc
changeset 768 308022f26450
parent 762 a3d917474ae4
child 793 268bf4ca5fa1
equal deleted inserted replaced
767:e7d6619f6145 768:308022f26450
  1122   s4o.print(" ");
  1122   s4o.print(" ");
  1123   symbol->derived_function_name->accept(*this);
  1123   symbol->derived_function_name->accept(*this);
  1124   s4o.print(" = ");
  1124   s4o.print(" = ");
  1125   {
  1125   {
  1126     /* get the default value of this variable's type */
  1126     /* get the default value of this variable's type */
  1127     symbol_c *default_value = (symbol_c *)symbol->type_name->accept(*type_initial_value_c::instance());
  1127     symbol_c *default_value = type_initial_value_c::get(symbol->type_name);
  1128     if (default_value == NULL) ERROR;
  1128     if (default_value == NULL) ERROR;
  1129     initialization_analyzer_c initialization_analyzer(default_value);
  1129     initialization_analyzer_c initialization_analyzer(default_value);
  1130     switch (initialization_analyzer.get_initialization_type()) {
  1130     switch (initialization_analyzer.get_initialization_type()) {
  1131       case initialization_analyzer_c::struct_it:
  1131       case initialization_analyzer_c::struct_it:
  1132         {
  1132         {