# HG changeset patch # User lbessard # Date 1231962869 -3600 # Node ID 09004f402097df4a22554a979c53f2018fd37d32 # Parent 83963465b7739312d861aadc364c2d665e0fcbe0 Bug with external variable declaration fixed diff -r 83963465b773 -r 09004f402097 stage4/generate_c/generate_var_list.cc --- a/stage4/generate_c/generate_var_list.cc Wed Jan 14 19:47:41 2009 +0100 +++ b/stage4/generate_c/generate_var_list.cc Wed Jan 14 20:54:29 2009 +0100 @@ -106,8 +106,13 @@ void update_var_type_symbol(symbol_c *symbol) { this->current_var_type_name = spec_init_sperator_c::get_spec(symbol); - if (this->current_var_type_name == NULL) + if (this->current_var_type_name == NULL) { + std::list::iterator pt; + for(pt = current_symbol_list.begin(); pt != current_symbol_list.end(); pt++) { + fprintf(stderr, "%s.", ((identifier_c*)(pt->symbol))->value); + } ERROR; + } this->current_var_type_symbol = search_fb_typedecl->get_decl(this->current_var_type_name); if (this->current_var_type_symbol != NULL) @@ -347,7 +352,7 @@ /* Start off by setting the current_var_type_symbol and * current_var_init_symbol private variables... */ - update_var_type_symbol(symbol); + update_var_type_symbol(symbol->specification); /* now to produce the c equivalent... */ if (this->current_var_type_category == variable_vtc)