replace call to search_constant_type_c with symbol.datatype
authorMario de Sousa <msousa@fe.up.pt>
Fri, 26 Oct 2012 13:48:16 +0100
changeset 697 bb4511694c0e
parent 696 7530eae6786d
child 698 ec8df1de3e08
replace call to search_constant_type_c with symbol.datatype
stage4/generate_c/generate_c_typedecl.cc
--- a/stage4/generate_c/generate_c_typedecl.cc	Tue Oct 09 22:29:26 2012 +0200
+++ b/stage4/generate_c/generate_c_typedecl.cc	Fri Oct 26 13:48:16 2012 +0100
@@ -316,14 +316,11 @@
 
 /* enumerated_type_name '#' identifier */
 void *visit(enumerated_value_c *symbol) {
-  symbol_c *value_type;
   if (current_typedefinition == enumerated_td)
     current_type_name->accept(*basedecl);
   else {
-    value_type = (symbol_c *)symbol->accept(search_constant_type);
-    if (value_type == NULL) ERROR;
-
-    value_type->accept(*basedecl);
+    if (NULL == symbol->datatype) ERROR;
+    symbol->datatype->accept(*basedecl);
   }
   s4o_incl.print("__");
   symbol->value->accept(*basedecl);