Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 8cbe732066c1d0d00e6d6622a2e8b5a6b1f72c45)
+++ src/ResolvExpr/CommonType.cc	(revision 7d55e4dc38c32ca94ef018a3351482d390520db1)
@@ -184,6 +184,6 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	#define BT BasicType::
-	static const BasicType::Kind commonTypes[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
+	#define BT ast::BasicType::
+	static const BT Kind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
 		/*		                        B                       C                      SC                      UC                      SI                     SUI
 				                        I                      UI                      LI                     LUI                     LLI                    LLUI
@@ -497,5 +497,5 @@
 	void CommonType_old::postvisit( BasicType * basicType ) {
 		if ( BasicType * otherBasic = dynamic_cast< BasicType * >( type2 ) ) {
-			BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ otherBasic->get_kind() ];
+			BasicType::Kind newType = (BasicType::Kind)(int)commonTypes[ (ast::BasicType::Kind)(int)basicType->get_kind() ][ (ast::BasicType::Kind)(int)otherBasic->get_kind() ];
 			if ( ( ( newType == basicType->get_kind() && basicType->tq >= otherBasic->tq ) || widenFirst ) && ( ( newType == otherBasic->get_kind() && basicType->tq <= otherBasic->tq ) || widenSecond ) ) {
 				result = new BasicType( basicType->tq | otherBasic->tq, newType );
@@ -503,5 +503,5 @@
 		} else if (  dynamic_cast< ZeroType * >( type2 ) || dynamic_cast< OneType * >( type2 ) ) {
 			// use signed int in lieu of the enum/zero/one type
-			BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ BasicType::SignedInt ];
+			BasicType::Kind newType = (BasicType::Kind)(int)commonTypes[ (ast::BasicType::Kind)(int)basicType->get_kind() ][ ast::BasicType::SignedInt ];
 			if ( ( ( newType == basicType->get_kind() && basicType->tq >= type2->tq ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->tq <= type2->tq ) || widenSecond ) ) {
 				result = new BasicType( basicType->tq | type2->tq, newType );
@@ -512,5 +512,5 @@
 				result = baseType->clone();
 			} else {
-				BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ BasicType::SignedInt ];
+				BasicType::Kind newType = (BasicType::Kind)(int)commonTypes[ (ast::BasicType::Kind)(int)basicType->get_kind() ][ ast::BasicType::SignedInt ];
 				if ( ( ( newType == basicType->get_kind() && basicType->tq >= type2->tq ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->tq <= type2->tq ) || widenSecond ) ) {
 					result = new BasicType( basicType->tq | type2->tq, newType );
@@ -700,5 +700,5 @@
 				else if (!widen.first) kind = basic->kind; // widen.second
 				else if (!widen.second) kind = basic2->kind;
-				else kind = (ast::BasicType::Kind)(int)commonTypes[ (BasicType::Kind)(int)basic->kind ][ (BasicType::Kind)(int)basic2->kind ];
+				else kind = commonTypes[ basic->kind ][ basic2->kind ];
 				// xxx - what does qualifiers even do here??
 				if ( (basic->qualifiers >= basic2->qualifiers || widen.first)
@@ -719,5 +719,5 @@
 				} else {
 					#warning remove casts when `commonTypes` moved to new AST
-					ast::BasicType::Kind kind = (ast::BasicType::Kind)(int)commonTypes[ (BasicType::Kind)(int)basic->kind ][ (BasicType::Kind)(int)ast::BasicType::SignedInt ];
+					ast::BasicType::Kind kind = commonTypes[ basic->kind ][ ast::BasicType::SignedInt ];
 					if (
 						( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
Index: src/ResolvExpr/ConversionCost.cc
===================================================================
--- src/ResolvExpr/ConversionCost.cc	(revision 8cbe732066c1d0d00e6d6622a2e8b5a6b1f72c45)
+++ src/ResolvExpr/ConversionCost.cc	(revision 7d55e4dc38c32ca94ef018a3351482d390520db1)
@@ -226,5 +226,5 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	static const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
+	static const int costMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
 		/*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
 		/*      B */ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  15,  16,  17,  16,  18,  17, },
@@ -274,5 +274,5 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	static const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
+	static const int signMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
 		/*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
 		/*      B */ {   0,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
