Index: src/BasicTypes-gen.cc
===================================================================
--- src/BasicTypes-gen.cc	(revision 36e6f1046d925b57eafde5cec34d7e4eeb37dcb9)
+++ src/BasicTypes-gen.cc	(revision 7d55e4dc38c32ca94ef018a3351482d390520db1)
@@ -117,5 +117,5 @@
 	// { LongDoubleImaginary, "LongDoubleImaginary", "LDI", "long double _Imaginary", "Ie", false, LongDoubleComplex, -1, -1, 17 },
 
-	{ uFloat128x, "uFloat128x", "_FBX", "_Float128x", "DF128x_", Floating, uFloat128xComplex, -1, -1, 18 },	
+	{ uFloat128x, "uFloat128x", "_FBX", "_Float128x", "DF128x_", Floating, uFloat128xComplex, -1, -1, 18 },
 	{ uFloat128xComplex, "uFloat128xComplex", "_FLDXC", "_Float128x _Complex", "CDF128x_", Floating, -1, -1, -1, 18 }
 }; // graph
@@ -127,12 +127,12 @@
 void generateCosts( int row ) {
 	bool seen[NUMBER_OF_BASIC_TYPES] = { false /*, ... */ };
-	
+
 	struct el_cost {
 		int i;
 		int path;
 		int sign;
-		
+
 		el_cost( int i = 0, int p = 0, int s = 0 ) : i(i), path(p), sign(s) {}
-		
+
 		// reverse the sense for use in largest-on-top priority queue
 		bool operator< (const el_cost& o) const {
@@ -195,5 +195,5 @@
 			return;
 		} // if
-		
+
 		i = graph[col].middle;
 		if ( i == -1 ) assert("invalid ancestor assumption");
@@ -284,5 +284,5 @@
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\t" << graph[r].name << "," << endl;
-	} // for	
+	} // for
 	code << "\t\tNUMBER_OF_BASIC_TYPES" << endl;
 	code << "\t} kind;" << endl;
@@ -307,5 +307,5 @@
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\"" << graph[r].type << "\"," << endl;
-	} // for	
+	} // for
 	code << "};" << endl;
 
@@ -329,5 +329,5 @@
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\t" << graph[r].name << "," << endl;
-	} // for	
+	} // for
 	code << "\t\tNUMBER_OF_BASIC_TYPES" << endl;
 	code << "\t} kind;" << endl;
@@ -352,5 +352,5 @@
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\"" << graph[r].type << "\"," << endl;
-	} // for	
+	} // for
 	code << "};" << endl;
 
@@ -391,7 +391,7 @@
 	end += sizeof( STARTMK );
 	code << str.substr( start, end - start );
-	
+
 	code << "\t" << BYMK << endl;
-	code << "\tstatic const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
+	code << "\tstatic const int costMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
 		 << "\t\t/*           ";
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
@@ -411,5 +411,5 @@
 	code << "\tstatic const int maxIntCost = " << *max_element(costMatrix[SignedInt], costMatrix[SignedInt] + NUMBER_OF_BASIC_TYPES) << ";" << endl;
 	code << "\t";										// indentation for end marker
-	
+
 	if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost );
 	if ( (end = str.find( STARTMK, start + 1 )) == string::npos ) Abort( "start", ConversionCost );
@@ -418,5 +418,5 @@
 
 	code << "\t" << BYMK << endl;
-	code << "\tstatic const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
+	code << "\tstatic const int signMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
 		 << "\t\t/*           ";
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
@@ -450,6 +450,6 @@
 	enum { PER_ROW = 6 };
 	code << "\t" << BYMK << endl;
-	code << "\t#define BT BasicType::" << endl;
-	code << "\tstatic const BasicType::Kind commonTypes[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor" << endl
+	code << "\t#define BT ast::BasicType::" << endl;
+	code << "\tstatic const BT Kind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor" << endl
 	     << "\t\t/*\t\t ";
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
@@ -505,9 +505,9 @@
 		"\t\t\t//   - \"Di\" char32_t\n"
 		"\t\t\t//   - \"Ds\" char16_t\n";
-		
-	code << "\t\t\tconst std::string basicTypes[BasicType::NUMBER_OF_BASIC_TYPES] = {" << endl;
+
+	code << "\t\t\tconst std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {" << endl;
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\t\t\t\"" << graph[r].mangled << "\"," << setw(9 - strlen(graph[r].mangled)) << ' ' << "// " << graph[r].type << endl;
-	} // for	
+	} // for
 	code << "\t\t\t}; // basicTypes" << endl;
 	code << "\t\t\t";									// indentation for end marker
Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 36e6f1046d925b57eafde5cec34d7e4eeb37dcb9)
+++ 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 36e6f1046d925b57eafde5cec34d7e4eeb37dcb9)
+++ 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, },
Index: src/SymTab/ManglerCommon.cc
===================================================================
--- src/SymTab/ManglerCommon.cc	(revision 36e6f1046d925b57eafde5cec34d7e4eeb37dcb9)
+++ src/SymTab/ManglerCommon.cc	(revision 7d55e4dc38c32ca94ef018a3351482d390520db1)
@@ -39,5 +39,5 @@
 			//   - "Di" char32_t
 			//   - "Ds" char16_t
-			const std::string basicTypes[BasicType::NUMBER_OF_BASIC_TYPES] = {
+			const std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {
 				"b",        // _Bool
 				"c",        // char
