Bug with enumerated_value fixed
authorlbessard
Thu, 25 Sep 2008 10:25:30 +0200
changeset 144 0ee0055a8ffe
parent 143 73372bdeeffb
child 145 72ae82e65dbc
Bug with enumerated_value fixed
stage4/generate_iec/generate_iec.cc
--- a/stage4/generate_iec/generate_iec.cc	Mon Sep 15 13:36:24 2008 +0200
+++ b/stage4/generate_iec/generate_iec.cc	Thu Sep 25 10:25:30 2008 +0200
@@ -410,8 +410,10 @@
 
 /* enumerated_type_name '#' identifier */
 void *visit(enumerated_value_c *symbol) {
-  symbol->type->accept(*this);
-  s4o.print("#");
+  if (symbol->type != NULL) {
+    symbol->type->accept(*this);
+    s4o.print("#");
+  }
   symbol->value->accept(*this);
   return NULL;
 }