Index: src/ControlStruct/TranslateEnumRange.cpp
===================================================================
--- src/ControlStruct/TranslateEnumRange.cpp	(revision 597f28439bb7a7c7930eaafb31d0f41a67c2fd6c)
+++ src/ControlStruct/TranslateEnumRange.cpp	(revision 6d2b3dcd9e518ea112923a8e83105ce7a4a77fd6)
@@ -22,11 +22,6 @@
         auto typeExpr = stmt->range_over.strict_as<ast::TypeExpr>();
         auto type = typeExpr->type;
-        auto inits = stmt->inits;
-        auto enumInst = type.strict_as<ast::EnumInstType>();
-        auto enumDecl = enumInst->base;
 
         auto objInit = stmt->inits.front();
-        auto initLocation = objInit->location;
-        auto rangeLocation = stmt->range_over->location;
         assert( stmt->inits.size() == 1 );
 
@@ -47,10 +42,5 @@
 const ast::Stmt* addInit::postvisit( const ast::ForStmt * stmt ) {
     if ( stmt->range_over ) {
-        auto typeExpr = stmt->range_over.strict_as<ast::TypeExpr>();
-        auto type = typeExpr->type;
         auto inits = stmt->inits;
-        auto enumInst = type.strict_as<ast::EnumInstType>();
-        auto enumDecl = enumInst->base;
-
         auto init = stmt->inits.front();
 
@@ -60,8 +50,10 @@
                 if ( !objDecl->init ) {
                     auto location = stmt->location;
-                    // auto newInit = new ast::SingleInit( location, new ast::NameExpr( location, enumDecl->members.front()->name ) );
                     ast::SingleInit * newInit = new ast::SingleInit( location, 
-                        new ast::NameExpr( location, 
-                           stmt->is_inc? enumDecl->members.front()->name: enumDecl->members.back()->name ) );
+                        stmt->is_inc?
+                        ast::UntypedExpr::createCall( location, "lowerBound", {} ):
+                        ast::UntypedExpr::createCall( location, "upperBound", {} ),
+                        ast::ConstructFlag::MaybeConstruct
+                    );
                     auto objDeclWithInit = ast::mutate_field( objDecl, &ast::ObjectDecl::init, newInit );
                     auto declWithInit = ast::mutate_field( declStmt, &ast::DeclStmt::decl, objDeclWithInit );
@@ -80,8 +72,4 @@
     auto initDecl = declStmt->decl.strict_as<ast::ObjectDecl>();
     auto indexName = initDecl->name;
-    
-    auto typeExpr = stmt->range_over.strict_as<ast::TypeExpr>();
-    auto enumInst = typeExpr->type.strict_as<ast::EnumInstType>();
-    auto enumDecl = enumInst->base;
 
     // Both inc and dec check if the current posn less than the number of enumerator
@@ -90,13 +78,9 @@
     ast::UntypedExpr * condition = ast::UntypedExpr::createCall( location,
         "?<=?",
-        {new ast::CastExpr(location,
-            new ast::NameExpr( location, indexName ),
-            new ast::BasicType( ast::BasicKind::UnsignedInt 
-        ),ast::GeneratedFlag::ExplicitCast),
-        ast::ConstantExpr::from_ulong( location, enumDecl->members.size()-1 ) });
+        {   new ast::NameExpr( location, indexName ),
+            ast::UntypedExpr::createCall( location, "upperBound", {} )  });
     auto increment = ast::UntypedExpr::createCall( location, 
-        stmt->is_inc? "succ": "pred",{
-        new ast::NameExpr( location, indexName )
-    });
+        stmt->is_inc? "succ": "pred",
+        { new ast::NameExpr( location, indexName ) });
     auto assig = ast::UntypedExpr::createAssign( location, new ast::NameExpr( location, indexName ), increment );
     auto mut = ast::mutate_field( stmt, &ast::ForStmt::cond, condition );
@@ -106,5 +90,4 @@
 
 void translateEnumRange( ast::TranslationUnit & translationUnit ) {
-    ast::Pass<addInitType>::run( translationUnit );
     ast::Pass<addInit>::run( translationUnit );
     ast::Pass<translateEnumRangeCore>::run( translationUnit );
Index: src/Parser/StatementNode.cpp
===================================================================
--- src/Parser/StatementNode.cpp	(revision 597f28439bb7a7c7930eaafb31d0f41a67c2fd6c)
+++ src/Parser/StatementNode.cpp	(revision 6d2b3dcd9e518ea112923a8e83105ce7a4a77fd6)
@@ -216,5 +216,5 @@
 		return new ast::ForStmt( location,
 			std::move( astinit ),
-			range_over, forctl->kind == OperKinds::LThan,
+			range_over, forctl->kind == OperKinds::LEThan,
 			buildMoveSingle( stmt ),
 			buildMoveOptional( else_ )
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 597f28439bb7a7c7930eaafb31d0f41a67c2fd6c)
+++ src/Parser/parser.yy	(revision 6d2b3dcd9e518ea112923a8e83105ce7a4a77fd6)
@@ -275,8 +275,9 @@
 } // forCtrl
 
-ForCtrl * enumRangeCtrl( ExpressionNode * index_expr, __attribute__((unused)) OperKinds compop, ExpressionNode * range_over_expr ) {
+ForCtrl * enumRangeCtrl( ExpressionNode * index_expr, OperKinds compop, ExpressionNode * range_over_expr, DeclarationNode * type ) {
+	assert( compop == OperKinds::LEThan || compop == OperKinds::GEThan );
 	if ( auto identifier = dynamic_cast<ast::NameExpr *>(index_expr->expr.get()) ) {
-		DeclarationNode * indexDecl = DeclarationNode::newName( new std::string(identifier->name) );
-		assert( range_over_expr );
+		DeclarationNode * indexDecl =
+			DeclarationNode::newName( new std::string(identifier->name) )->addType( type );
 		return new ForCtrl( new StatementNode( indexDecl ), range_over_expr, compop );
 	} else {
@@ -1605,7 +1606,7 @@
 		{ SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
 
-	| comma_expression ';' enum_key						// CFA, enum type
-		{
-			$$ = enumRangeCtrl( $1, OperKinds::LEThan, new ExpressionNode( new ast::TypeExpr( yylloc, $3->buildType() ) ) );
+	| comma_expression ';' type_type_specifier						// CFA, enum type
+		{
+			$$ = enumRangeCtrl( $1, OperKinds::LEThan, new ExpressionNode( new ast::TypeExpr( yylloc, $3->clone()->buildType() ) ), $3 );
 		}
 	| comma_expression ';' downupdowneq enum_key		// CFA, enum type, reverse direction
@@ -1615,5 +1616,5 @@
 				$3 = OperKinds::GEThan;
 			} // if
-			$$ = enumRangeCtrl( $1, $3, new ExpressionNode( new ast::TypeExpr( yylloc, $4->buildType() ) ) );
+			$$ = enumRangeCtrl( $1, $3, new ExpressionNode( new ast::TypeExpr( yylloc, $4->clone()->buildType() ) ), $4 );
 		}
 	;
@@ -1621,9 +1622,12 @@
 enum_key:
 	type_name
-		{ $$ = DeclarationNode::newEnum( $1->symbolic.name, nullptr, false, false ); }
+		{	typedefTable.makeTypedef( *$1->symbolic.name, "enum_type_nobody 1" );
+			$$ = DeclarationNode::newEnum( $1->symbolic.name, nullptr, false, false ); }
 	| ENUM identifier
-		{ $$ = DeclarationNode::newEnum( $2, nullptr, false, false ); }
+		{	typedefTable.makeTypedef( *$2, "enum_type_nobody 2" );
+			$$ = DeclarationNode::newEnum( $2, nullptr, false, false ); }
 	| ENUM type_name
-		{ $$ = DeclarationNode::newEnum( $2->symbolic.name, nullptr, false, false ); }
+		{	typedefTable.makeTypedef( *$2->symbolic.name, "enum_type_nobody 3" );
+			$$ = DeclarationNode::newEnum( $2->symbolic.name, nullptr, false, false ); }
 	;
 
