Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ src/CodeGen/CodeGenerator.cc	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -273,10 +273,31 @@
 	}
 
+	template<typename pass_type>
+	inline void genEnumInitializer( PassVisitor<pass_type> * visitor, Type * baseType, std::ostream & output,
+	Initializer * init, long long * cur_val, Options options) {
+		auto baseTypeAsBasic = baseType ? dynamic_cast<BasicType *>( baseType ) : nullptr;
+		if ( init ) { // If value has an explicit initiazatior 
+			output << " = "; 
+			output << "(" << genType(baseType, "", options) << ")";
+			init->accept( *visitor );
+			if ( baseTypeAsBasic && baseTypeAsBasic->isInteger() ) { // if it is an integral type and initilizer offered, 
+			// need to update the cur_val
+				Expression* expr = ((SingleInit *)(init))->value;
+				while ( auto temp = dynamic_cast<CastExpr *>(expr) ) { // unwrap introduced cast
+					expr = temp->arg;
+				}
+				*cur_val = ((ConstantExpr *)expr)->constant.get_ival()+1;
+			}
+		} else if ( baseTypeAsBasic && baseTypeAsBasic->isInteger() ) { // integral implicitly init to cur_val + 1
+			output << " = " << "(" << genType(baseType, "", options) << ")";
+			output << (*cur_val)++;
+		}
+	}
+
 	void CodeGenerator::postvisit( EnumDecl * enumDecl ) {
 		extension( enumDecl );
 		std::list< Declaration* > &memb = enumDecl->get_members();
 		if (enumDecl->base && ! memb.empty()) {
-			unsigned long long last_val = -1; // if the first enum value has no explicit initializer,
-			// as other
+			long long cur_val = 0;
 			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
 				ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i );
@@ -284,24 +305,5 @@
 				output << "static ";
 				output << genType(enumDecl->base, mangleName( obj ), options);
-				output << " = ";
-				output << "(" << genType(enumDecl->base, "", options) << ")";
-				if ( (BasicType *)(enumDecl->base) && ((BasicType *)(enumDecl->base))->isWholeNumber() ) {
-					if ( obj->get_init() ) {
-						obj->get_init()->accept( *visitor );
-						Expression* expr = ((SingleInit *)(obj->init))->value;
-						while ( auto temp = dynamic_cast<CastExpr *>(expr) ) {
-							expr = temp->arg;
-						}
-						last_val = ((ConstantExpr *)expr)->constant.get_ival();
-					} else {
-						output << ++last_val;
-					} // if
-				} else {
-					if ( obj->get_init() ) {
-						obj->get_init()->accept( *visitor );
-					} else {
-						// Should not reach here!
-					}
-				}
+				genEnumInitializer( visitor, enumDecl->base, output, obj->get_init(), &cur_val, options);
 				output << ";" << endl;
 			} // for
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ src/Parser/TypeData.cc	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -933,5 +933,5 @@
 			member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ) ) );
 		} else if ( !cur->initializer ) {
-			if ( baseType && (!dynamic_cast<BasicType *>(baseType) || !dynamic_cast<BasicType *>(baseType)->isWholeNumber())) {
+			if ( baseType && (!dynamic_cast<BasicType *>(baseType) || !dynamic_cast<BasicType *>(baseType)->isInteger())) {
 				SemanticError( td->location, "Enumerators of an non-integer typed enum must be explicitly initialized." );
 			}
Index: src/SynTree/BasicType.cc
===================================================================
--- src/SynTree/BasicType.cc	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ src/SynTree/BasicType.cc	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -29,21 +29,4 @@
 }
 
-bool BasicType::isWholeNumber() const {
-	return kind == Bool || 
-		kind ==Char ||
-		kind == SignedChar ||
-		kind == UnsignedChar ||
-		kind == ShortSignedInt ||
-		kind == ShortUnsignedInt ||
-		kind == SignedInt ||
-		kind == UnsignedInt ||
-		kind == LongSignedInt ||
-		kind == LongUnsignedInt ||
-		kind == LongLongSignedInt ||
-		kind ==LongLongUnsignedInt ||
-		kind == SignedInt128 ||
-		kind == UnsignedInt128;
-}
-
 bool BasicType::isInteger() const {
 	return kind <= UnsignedInt128;
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ src/SynTree/Type.h	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -271,5 +271,4 @@
 	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
 	virtual void print( std::ostream & os, Indenter indent = {} ) const override;
-	bool isWholeNumber() const;
 	bool isInteger() const;
 };
Index: sts/enum_tests/.expect/pointerEnum.cfa
===================================================================
--- tests/enum_tests/.expect/pointerEnum.cfa	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ 	(revision )
@@ -1,1 +1,0 @@
-v: 1
Index: sts/enum_tests/.expect/qualifiedEnum.cfa
===================================================================
--- tests/enum_tests/.expect/qualifiedEnum.cfa	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ 	(revision )
@@ -1,1 +1,0 @@
-l :1
Index: tests/enum_tests/.expect/typedIntEnum.txt
===================================================================
--- tests/enum_tests/.expect/typedIntEnum.txt	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ tests/enum_tests/.expect/typedIntEnum.txt	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -1,7 +1,7 @@
-0
-1
-1000
-1001
-2000
-2001
-2002
+0=0
+1=1
+1000=1000
+1001=1001
+2000=2000
+2001=2001
+2002=2002
Index: tests/enum_tests/pointerEnum.cfa
===================================================================
--- tests/enum_tests/pointerEnum.cfa	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ tests/enum_tests/pointerEnum.cfa	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -11,4 +11,4 @@
 int main() {
     E * v = First;
-    sout | "v: " | e.x;
+    // sout | "v: " | e.x;
 }
Index: tests/enum_tests/typedIntEnum.cfa
===================================================================
--- tests/enum_tests/typedIntEnum.cfa	(revision b3d794fc542431b51b3ba5cde9b590327b3a4b64)
+++ tests/enum_tests/typedIntEnum.cfa	(revision 34a1d2e59f01760d508228626f767d567ef45b31)
@@ -12,11 +12,11 @@
 
 int main() {
-    printf("%d\n", zero);
-    printf("%d\n", one);
-    printf("%d\n", thousand);
-    printf("%d\n", thousand_one);
-    printf("%d\n", two_thousand);
-    printf("%d\n", two_thousand_one);
-    printf("%d\n", two_thousand_two);
+    printf("0=%d\n", zero);
+    printf("1=%d\n", one);
+    printf("1000=%d\n", thousand);
+    printf("1001=%d\n", thousand_one);
+    printf("2000=%d\n", two_thousand);
+    printf("2001=%d\n", two_thousand_one);
+    printf("2002=%d\n", two_thousand_two);
     return 0;
 }
