Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision 6fd195572c21d131b70087819d102d7077cc521b)
+++ src/Parser/ExpressionNode.cc	(revision 0a616e01964452b90204d19710c490e699c8ddce)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:17:07 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 28 21:36:38 2019
-// Update Count     : 933
+// Last Modified On : Sun Mar 10 16:10:32 2019
+// Update Count     : 976
 //
 
@@ -66,25 +66,48 @@
 void lnthSuffix( string & str, int & type, int & ltype ) {
 	string::size_type posn = str.find_last_of( "lL" );
-	if ( posn != string::npos ) {
-		type = 3;										// default
-		posn += 1;										// advance to size
-		if ( str[posn] == '3' ) {						// 32
-			type = ltype = 2; str.erase( posn, 2 );
-		} else if ( str[posn] == '6' ) {				// 64
-			type = ltype = 3; str.erase( posn, 2 );
-		} else if ( str[posn] == '8' ) {				// 8
-			type = ltype = 1; str.erase( posn, 1 );
-		} else if ( str[posn] == '1' ) {
-			if ( str[posn + 1] == '6' ) {				// 16
-				type = ltype = 0; str.erase( posn, 2 );
-			} else {									// 128
-				type = ltype = 5; str.erase( posn, 3 );
-			} // if
-		} // if
-	} // if
+
+	if ( posn == string::npos ) return;					// no suffix
+	if ( posn == str.length() - 1 ) { type = 3; return; } // no length => long
+
+	string::size_type next = posn + 1;					// advance to length
+	if ( str[next] == '3' ) {							// 32
+		type = ltype = 2;
+	} else if ( str[next] == '6' ) {					// 64
+		type = ltype = 3;
+	} else if ( str[next] == '8' ) {					// 8
+		type = ltype = 1;
+	} else if ( str[next] == '1' ) {
+		if ( str[next + 1] == '6' ) {					// 16
+			type = ltype = 0;
+		} else {										// 128
+			type = 5; ltype = 6;
+		} // if
+	} // if
+	// remove "lL" for these cases because it may not imply long
+	str.erase( posn );									// remove length
 } // lnthSuffix
 
+void valueToType( unsigned long long int & v, bool dec, int & type, bool & Unsigned ) {
+	// use value to determine type
+	if ( v <= INT_MAX ) {								// signed int
+		type = 2;
+	} else if ( v <= UINT_MAX && ! dec ) {				// unsigned int
+		type = 2;
+		Unsigned = true;								// unsigned
+	} else if ( v <= LONG_MAX ) {						// signed long int
+		type = 3;
+	} else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int
+		type = 3;
+		Unsigned = true;								// unsigned long int
+	} else if ( v <= LLONG_MAX ) {						// signed long long int
+		type = 4;
+	} else {											// unsigned long long int
+		type = 4;
+		Unsigned = true;								// unsigned long long int
+	} // if
+} // valueToType
+
 Expression * build_constantInteger( string & str ) {
-	static const BasicType::Kind kind[2][6] = {
+	static const BasicType::Kind kind[2][7] = {
 		// short (h) must be before char (hh) because shorter type has the longer suffix
 		{ BasicType::ShortSignedInt, BasicType::SignedChar, BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt, BasicType::SignedInt128, },
@@ -92,17 +115,17 @@
 	};
 
-	static const char * lnthsInt[2][5] = {
-		{ "int16_t",  "int8_t",  "int32_t",  "int64_t",  "size_t", },
-		{ "uint16_t", "uint8_t", "uint32_t", "uint64_t", "size_t", },
+	static const char * lnthsInt[2][6] = {
+		{ "int16_t",  "int8_t",  "int32_t",  "int64_t",  "size_t",  "uintptr_t", },
+		{ "uint16_t", "uint8_t", "uint32_t", "uint64_t", "size_t",  "uintptr_t", },
 	}; // lnthsInt
-
-	bool dec = true, Unsigned = false;					// decimal, unsigned constant
-	int type = -1;										// 0 => short, 1 => char, 2 => int, 3 => long int, 4 => long long int, 5 => int128
-	int ltype = -1;										// literal length
 
 	unsigned long long int v;							// converted integral value
 	size_t last = str.length() - 1;						// last subscript of constant
 	Expression * ret;
-	string fred( str );
+	//string fred( str );
+
+	int type = -1;										// 0 => short, 1 => char, 2 => int, 3 => long int, 4 => long long int, 5 => int128
+	int ltype = -1;										// 0 => 16 bits, 1 => 8 bits, 2 => 32 bits, 3 => 64 bits, 4 => size_t, 5 => intptr, 6 => pointer
+	bool dec = true, Unsigned = false;					// decimal, unsigned constant
 
 	// special constants
@@ -116,5 +139,5 @@
 	} // if
 
-	// Cannot be just "0"/"1"; sscanf stops at the suffix, if any; value goes over the wall so always generate
+	// Cannot be just "0"/"1"; sscanf stops at the suffix, if any; value goes over the wall => always generate
 
 	if ( str[0] == '0' ) {								// radix character ?
@@ -125,5 +148,5 @@
 		} else if ( checkB( str[1] ) ) {				// binary constant ?
 			v = 0;										// compute value
-			for ( unsigned int i = 2;; ) {
+			for ( unsigned int i = 2;; ) {				// ignore prefix
 				if ( str[i] == '1' ) v |= 1;
 				i += 1;
@@ -145,26 +168,17 @@
 	if ( isdigit( str[last] ) ) {						// no suffix ?
 		lnthSuffix( str, type, ltype );					// could have length suffix
-		if ( type == -1 ) {
-			// no suffix type, use value to determine type
-			if ( v <= INT_MAX ) {						// signed int
-				type = 2;
-			} else if ( v <= UINT_MAX && ! dec ) {		// unsigned int
-				type = 2;
-				Unsigned = true;						// unsigned
-			} else if ( v <= LONG_MAX ) {				// signed long int
-				type = 3;
-			} else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int
-				type = 3;
-				Unsigned = true;						// unsigned long int
-			} else if ( v <= LLONG_MAX ) {				// signed long long int
-				type = 4;
-			} else {									// unsigned long long int
-				type = 4;
-				Unsigned = true;						// unsigned long long int
-			} // if
+		if ( type == -1 ) {								// no suffix
+			valueToType( v, dec, type, Unsigned );
 		} // if
 	} else {
 		// At least one digit in integer constant, so safe to backup while looking for suffix.
 
+		posn = str.find_last_of( "pP" );
+		if ( posn != string::npos ) { valueToType( v, dec, type, Unsigned ); ltype = 5; str.erase( posn, 1 ); goto FINI; }
+
+		posn = str.find_last_of( "zZ" );
+		if ( posn != string::npos ) { Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 ); goto FINI; }
+
+		// 'u' can appear before or after length suffix
 		if ( str.find_last_of( "uU" ) != string::npos ) Unsigned = true;
 
@@ -181,16 +195,15 @@
 		if ( posn != string::npos ) { type = 2; str.erase( posn, 1 ); goto FINI; }
 
-		posn = str.find_last_of( "zZ" );
-		if ( posn != string::npos ) { Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 ); goto FINI; }
-
 		if ( str.rfind( "ll" ) != string::npos || str.rfind( "LL" ) != string::npos ) { type = 4; goto FINI; }
 
 		lnthSuffix( str, type, ltype );					// must be after check for "ll"
-		if ( type == -1 ) { type = 3; goto FINI; }
+		if ( type == -1 ) {								// only 'u' suffix ?
+			valueToType( v, dec, type, Unsigned );
+		} // if
 	  FINI: ;
 	} // if
 
-	//if ( !( 0 <= type && type < 6 ) ) { printf( "%s %lu %d %s\n", fred.c_str(), fred.length(), type, str.c_str() ); }
-	assert( 0 <= type && type < 6 );
+	//if ( !( 0 <= type && type <= 6 ) ) { printf( "%s %lu %d %s\n", fred.c_str(), fred.length(), type, str.c_str() ); }
+	assert( 0 <= type && type <= 6 );
 
 	// Constant type is correct for overload resolving.
@@ -200,9 +213,11 @@
 		ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][type] ), false );
 	} else if ( ltype != -1 ) {							// explicit length ?
-		if ( ltype == 5 ) {								// int128 ?
-			type = 5;
+		if ( ltype == 6 ) {								// int128, (int128)constant
 			ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][type] ), false );
-		} else {
+		} else {										// explicit length, (length_type)constant
 			ret = new CastExpr( ret, new TypeInstType( Type::Qualifiers(), lnthsInt[Unsigned][ltype], false ), false );
+			if ( ltype == 5 ) {							// pointer, intptr( (uintptr_t)constant ) 
+				ret = build_func( new ExpressionNode( build_varref( new string( "intptr" ) ) ), new ExpressionNode( ret ) );								  
+			} // if
 		} // if
 	} // if
Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision 6fd195572c21d131b70087819d102d7077cc521b)
+++ src/Parser/lex.ll	(revision 0a616e01964452b90204d19710c490e699c8ddce)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Wed Feb 27 22:44:03 2019
- * Update Count     : 704
+ * Last Modified On : Sun Mar 10 09:13:09 2019
+ * Update Count     : 706
  */
 
@@ -99,6 +99,8 @@
 hex_quad {hex}("_"?{hex}){3}
 size_opt (8|16|32|64|128)?
+				// CFA: explicit l8/l16/l32/l64/l128, char 'hh', short 'h', int 'n'
 length ("ll"|"LL"|[lL]{size_opt})|("hh"|"HH"|[hHnN])
-integer_suffix_opt ("_"?(([uU]({length}?[iI]?)|([iI]{length}))|([iI]({length}?[uU]?)|([uU]{length}))|({length}([iI]?[uU]?)|([uU][iI]))|[zZ]))?
+				// CFA: size_t 'z', pointer 'p', which define a sign and length
+integer_suffix_opt ("_"?(([uU]({length}?[iI]?)|([iI]{length}))|([iI]({length}?[uU]?)|([uU]{length}))|({length}([iI]?[uU]?)|([uU][iI]))|[zZ]|[pP]))?
 
 octal_digits ({octal})|({octal}({octal}|"_")*{octal})
