Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision f238fcc2eafd0e0a792e3db3f23ab47e63d45c2b)
+++ src/CodeGen/CodeGenerator.cc	(revision 4390fb6c47ec12d50fb1bde675943fbc98fe057a)
@@ -197,4 +197,28 @@
 		if ( objectDecl->isDeleted && options.genC ) return;
 
+		// objectDecl->checkAssignedValue();
+		/* Temporary add the enum check here; need a better location */
+		// {
+		// 	EnumInstType * enumTypePtr = dynamic_cast< EnumInstType *>(objectDecl->get_type());
+		// 	if (enumTypePtr) {
+		// 		EnumDecl * enumBase = enumTypePtr -> baseEnum;
+		// 		if ( enumTypePtr && enumBase->base ) {
+		// 			std::list< Declaration * > & enumMembers = enumBase->get_members();
+		// 			auto in_enum = [&]( Declaration * enumMem ) -> bool {
+		// 				ObjectDecl * obj = dynamic_cast< ObjectDecl* >( enumMem );
+		// 				if ( mangleName( obj ) == mangleName( objectDecl ) ) {
+		// 					return true;
+		// 				}
+		// 				return false;
+		// 			};
+		// 			if ( std::find_if( enumMembers.begin(), enumMembers.end(), in_enum ) == enumMembers.end() ) {
+ 		// 				output<< "/* Cannot assign a Non-enum member value to a typed enum variable. */" ;
+		// 			}
+				
+		// 		}
+		// 	}
+			
+		// }
+
 		// gcc allows an empty declarator (no name) for bit-fields and C states: 6.7.2.1 Structure and union specifiers,
 		// point 4, page 113: If the (bit field) value is zero, the declaration shall have no declarator.  For anything
@@ -230,4 +254,5 @@
 			objectDecl->get_bitfieldWidth()->accept( *visitor );
 		} // if
+		output << "/* objectDecl */";
 	}
 
@@ -274,30 +299,52 @@
 	void CodeGenerator::postvisit( EnumDecl * enumDecl ) {
 		extension( enumDecl );
-		output << "enum ";
-		genAttributes( enumDecl->get_attributes() );
-
-		output << enumDecl->get_name();
-
 		std::list< Declaration* > &memb = enumDecl->get_members();
-
-		if ( ! memb.empty() ) {
-			output << " {" << endl;
-
-			++indent;
+		if (enumDecl->base && ! memb.empty() && 
+		(dynamic_cast<BasicType *>(enumDecl->base)
+		 && !dynamic_cast<BasicType *>(enumDecl->base)->kind == BasicType::Kind::SignedInt)) {
+			ObjectDecl * last = nullptr;
 			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
 				ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i );
 				assert( obj );
-				output << indent << mangleName( obj );
+				output << "static const ";
+				output << genType(enumDecl->base, "", options) << " ";
+				output << mangleName( obj ) << " ";
+				output << " = ";
+				output << "(" << genType(enumDecl->base, "", options) << ")";;
 				if ( obj->get_init() ) {
-					output << " = ";
-					// In progress
 					obj->get_init()->accept( *visitor );
-				} // if
-				output << "," << endl;
+				} else {
+					if (last == nullptr) {
+						output << 0;
+					} else {
+						output << mangleName(last) << " + 1";
+					}
+				} // if—
+				output << ";" << endl;
+				last = obj;
 			} // for
-
+		} else {
+			output << "enum ";
+			genAttributes( enumDecl->get_attributes() );
+
+			output << enumDecl->get_name();
+
+			if ( ! memb.empty() ) {
+				output << " {" << endl;
+
+				++indent;
+				for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
+					ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i );
+					assert( obj );
+					output << indent << mangleName( obj );
+					if ( obj->get_init() ) {
+						output << " = ";
+						obj->get_init()->accept( *visitor );
+					} // if
+					output << "," << endl;
+				} // for
 			--indent;
-
 			output << indent << "}";
+			} // if
 		} // if
 	}
@@ -354,5 +401,5 @@
 			} // if
 		} // for
-		output << " = ";
+		output << " = /* Designation */";
 	}
 
@@ -662,8 +709,8 @@
 			output << opInfo->symbol;
 		} else {
-			if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type()) 
-			&& dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base) {
-				output << '(' <<genType(dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base, "", options) << ')';
-			}
+			// if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type()) 
+			// && dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base) {
+			// 	output << '(' <<genType(dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base, "", options) << ')';
+			// }
 			output << mangleName( variableExpr->get_var() );
 		} // if
@@ -913,5 +960,5 @@
 		}
 		exprStmt->get_expr()->accept( *visitor );
-		output << ";";
+		output << "; /* ExprStmt */";
 	}
 
