Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 6f950007fd85cf2f04928840823d690ed9c9d98b)
+++ src/SynTree/Type.h	(revision 7c700890e7a60235a8c2486a9ee74d5b67a7024f)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 16 17:44:11 2017
-// Update Count     : 135
+// Last Modified On : Fri Mar 17 09:04:03 2017
+// Update Count     : 147
 //
 
@@ -26,4 +26,6 @@
   public:
 	// Simulate inheritance because union does not allow it.
+	// Bug in g++-4.9 prevents static field in union
+	//static const char * Names[];
 	#define BFCommon( BFType, N ) \
 		bool operator[]( unsigned int i ) const { return val & (1 << i); } \
@@ -31,5 +33,4 @@
 		void reset() { val = 0; } \
 		int ffs() { return ::ffs( val ) - 1; } \
-		static const char * Names[]; \
 		BFType operator&=( BFType other ) { \
 			val &= other.val; return *this; \
@@ -55,5 +56,5 @@
 				for ( unsigned int i = 0; i < N; i += 1 ) { \
 					if ( (*this)[i] ) { \
-						os << Names[i] << ' '; \
+						os << BFType##Names[i] << ' '; \
 					} \
 				} \
@@ -64,4 +65,5 @@
 
 	enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NumFuncSpecifier = 3 };
+	static const char * FuncSpecifiersNames[];
 	union FuncSpecifiers {
 		unsigned int val;
@@ -73,10 +75,10 @@
 		FuncSpecifiers() : val( 0 ) {}
 		FuncSpecifiers( unsigned int val ) : val( val ) {}
-		bool operator==( FuncSpecifiers other ) const {	return val == other.val; }
-		bool operator!=( FuncSpecifiers other ) const { return val != other.val; }
+		// equality (==, !=) works implicitly on first field "val", relational operations are undefined.
 		BFCommon( FuncSpecifiers, NumFuncSpecifier )
 	}; // FuncSpecifiers
 
 	enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NumStorageClass = 5 };
+	static const char * StorageClassesNames[];
 	union StorageClasses {
 		unsigned int val;
@@ -91,33 +93,30 @@
 		StorageClasses() : val( 0 ) {}
 		StorageClasses( unsigned int val ) : val( val ) {}
-		bool operator==( StorageClasses other ) const {	return val == other.val; }
-		bool operator!=( StorageClasses other ) const { return val != other.val; }
+		// equality (==, !=) works implicitly on first field "val", relational operations are undefined.
 		BFCommon( StorageClasses, NumStorageClass )
 	}; // StorageClasses
 
 	enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6 };
+	static const char * QualifiersNames[];
 	union Qualifiers {
 		enum { Mask = ~(Restrict | Lvalue) };
 		unsigned int val;
 		struct {
-			bool isConst : 1;
-			bool isRestrict : 1;
-			bool isVolatile : 1;
-			bool isLvalue : 1;
-			bool isMutex : 1;
-			bool isAtomic : 1;
+			bool is_const : 1;
+			bool is_restrict : 1;
+			bool is_volatile : 1;
+			bool is_lvalue : 1;
+			bool is_mutex : 1;
+			bool is_atomic : 1;
 		};
 
 		Qualifiers() : val( 0 ) {}
 		Qualifiers( unsigned int val ) : val( val ) {}
-		bool operator==( Qualifiers other ) const {
-			return (val & Mask) == (other.val & Mask);
-		}
-		bool operator!=( Qualifiers other ) const {
-			return (val & Mask) != (other.val & Mask);
-		}
+		// Complex comparisons provide implicit qualifier downcasting, e.g., T downcast to const T.
+		bool operator==( Qualifiers other ) const { return (val & Mask) == (other.val & Mask); }
+		bool operator!=( Qualifiers other ) const { return (val & Mask) != (other.val & Mask); }
 		bool operator<=( Qualifiers other ) const {
-			return isConst <= other.isConst && isVolatile <= other.isVolatile &&
-				isMutex >= other.isMutex && isAtomic == other.isAtomic;
+			return is_const <= other.is_const && is_volatile <= other.is_volatile &&
+				is_mutex >= other.is_mutex && is_atomic == other.is_atomic;
 		}
 		bool operator<( Qualifiers other ) const { return *this != other && *this <= other; }
@@ -132,14 +131,16 @@
 
 	Qualifiers & get_qualifiers() { return tq; }
-	bool get_isConst() { return tq.isConst; }
-	bool get_isVolatile() { return tq.isVolatile; }
-	bool get_isRestrict() { return tq.isRestrict; }
-	bool get_isLvalue() { return tq.isLvalue; }
-	bool get_isAtomic() { return tq.isAtomic; }
-	void set_isConst( bool newValue ) { tq.isConst = newValue; }
-	void set_isVolatile( bool newValue ) { tq.isVolatile = newValue; }
-	void set_isRestrict( bool newValue ) { tq.isRestrict = newValue; }
-	void set_isLvalue( bool newValue ) { tq.isLvalue = newValue; }
-	void set_isAtomic( bool newValue ) { tq.isAtomic = newValue; }
+	bool get_const() { return tq.is_const; }
+	bool get_volatile() { return tq.is_volatile; }
+	bool get_restrict() { return tq.is_restrict; }
+	bool get_lvalue() { return tq.is_lvalue; }
+	bool get_mutex() { return tq.is_mutex; }
+	bool get_atomic() { return tq.is_atomic; }
+	void set_const( bool newValue ) { tq.is_const = newValue; }
+	void set_volatile( bool newValue ) { tq.is_volatile = newValue; }
+	void set_restrict( bool newValue ) { tq.is_restrict = newValue; }
+	void set_lvalue( bool newValue ) { tq.is_lvalue = newValue; }
+	void set_mutex( bool newValue ) { tq.is_mutex = newValue; }
+	void set_atomic( bool newValue ) { tq.is_atomic = newValue; }
 
 	typedef std::list<TypeDecl *> ForallList;
