Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision eb211bf8d8987a9f51f479f33bbdf5dd9ba03d82)
+++ src/AST/Convert.cpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
@@ -276,5 +276,5 @@
 		decl->parent = get<AggregateDecl>().accept1( node->parent );
 		declPostamble( decl, node );
-		return nullptr;
+		return nullptr; // ??
 	}
 
@@ -305,5 +305,6 @@
 	}
 
-	const ast::Decl * visit( const ast::EnumDecl * node ) override final {
+	const ast::Decl * visit( const ast::EnumDecl * node ) override final { // Marker: what is this for? 
+	// Called in ConverterNewToOld
 		if ( inCache( node ) ) return nullptr;
 		auto decl = new EnumDecl(
@@ -312,5 +313,5 @@
 			LinkageSpec::Spec( node->linkage.val )
 		);
-		return aggregatePostamble( decl, node );
+		return aggregatePostamble( decl, node ); // Node info, including members, processed in aggregatePostamble
 	}
 
@@ -1495,4 +1496,7 @@
 		getAccept1< ast::type, decltype( old->child ) >( old->child )
 
+#	define GET_ACCEPT_E(child, type) \
+		getAccept1< ast::type, decltype( old->base ) >( old->base )
+
 	template<typename NewT, typename OldC>
 	std::vector< ast::ptr<NewT> > getAcceptV( const OldC& old ) {
@@ -1710,4 +1714,6 @@
 	}
 
+	// Marker
+	// Convert SynTree::EnumDecl to AST::EnumDecl
 	virtual void visit( const EnumDecl * old ) override final {
 		if ( inCache( old ) ) return;
@@ -1716,5 +1722,7 @@
 			old->name,
 			GET_ACCEPT_V(attributes, Attribute),
-			{ old->linkage.val }
+			{ old->linkage.val },
+			old->base? GET_ACCEPT_E(base, Type) : nullptr,
+			old->enumValues
 		);
 		cache.emplace( old, decl );
@@ -1726,5 +1734,4 @@
 		decl->uniqueId   = old->uniqueId;
 		decl->storage    = { old->storageClasses.val };
-
 		this->node = decl;
 	}
Index: src/AST/Decl.cpp
===================================================================
--- src/AST/Decl.cpp	(revision eb211bf8d8987a9f51f479f33bbdf5dd9ba03d82)
+++ src/AST/Decl.cpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
@@ -133,6 +133,32 @@
 
 	auto it = enumValues.find( enumerator->name );
+	
 	if ( it != enumValues.end() ) {
-		value = it->second;
+			
+		// Handle typed enum by casting the value in (C++) compiler
+		if ( base ) { // A typed enum
+			if ( const BasicType * bt = dynamic_cast<const BasicType *>(base) ) {
+				switch( bt->kind ) {
+					case BasicType::Kind::Bool:	value = (bool) it->second; break;
+					case BasicType::Kind::Char: value = (char) it->second; break;
+					case BasicType::Kind::SignedChar: value = (signed char) it->second; break;
+					case BasicType::Kind::UnsignedChar: value = (unsigned char) it->second; break;
+					case BasicType::Kind::ShortSignedInt: value = (short signed int) it->second; break;
+					case BasicType::Kind::SignedInt: value = (signed int) it->second; break;
+					case BasicType::Kind::UnsignedInt: value = (unsigned int) it->second; break;
+					case BasicType::Kind::LongSignedInt: value = (long signed int) it->second; break;
+					case BasicType::Kind::LongUnsignedInt: value = (long unsigned int) it->second; break;
+					case BasicType::Kind::LongLongSignedInt: value = (long long signed int) it->second; break;
+					case BasicType::Kind::LongLongUnsignedInt: value = (long long unsigned int) it->second; break; 
+					// TODO: value should be able to handle long long unsigned int
+
+					default:
+					value = it->second;
+				}
+			}
+		} else {
+			value = it->second;
+		}
+
 		return true;
 	}
Index: src/AST/Decl.hpp
===================================================================
--- src/AST/Decl.hpp	(revision eb211bf8d8987a9f51f479f33bbdf5dd9ba03d82)
+++ src/AST/Decl.hpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
@@ -302,9 +302,13 @@
 class EnumDecl final : public AggregateDecl {
 public:
+	Type * base;
+
 	EnumDecl( const CodeLocation& loc, const std::string& name,
-		std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
-	: AggregateDecl( loc, name, std::move(attrs), linkage ), enumValues() {}
+		std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type * base = nullptr,
+		 std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
+	: AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {}
 
 	/// gets the integer value for this enumerator, returning true iff value found
+	// Maybe it is not used in producing the enum value
 	bool valueOf( const Decl * enumerator, long long& value ) const;
 
