Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 149d297044236702f0f6bdc13eb40ae80acfb760)
+++ src/Parser/DeclarationNode.cc	(revision 08d5507b99eb502f8fb69133c61233301ed6b029)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Mar  7 17:28:56 2017
-// Update Count     : 937
+// Last Modified On : Tue Mar 14 10:19:38 2017
+// Update Count     : 964
 //
 
@@ -90,6 +90,6 @@
 	newnode->type = maybeClone( type );
 	newnode->storageClasses = storageClasses;
+	newnode->funcSpecs = funcSpecs;
 	newnode->bitfieldWidth = maybeClone( bitfieldWidth );
-	newnode->funcSpecs = funcSpecs;
 	newnode->enumeratorValue.reset( maybeClone( enumeratorValue.get() ) );
 	newnode->hasEllipsis = hasEllipsis;
@@ -117,5 +117,5 @@
 
 void DeclarationNode::print_StorageClass( std::ostream & output, StorageClasses storageClasses ) {
-	if ( storageClasses.any() ) {								// function specifiers?
+	if ( storageClasses.val != 0 ) {					// storage classes ?
 		for ( unsigned int i = 0; i < DeclarationNode::NoStorageClass; i += 1 ) {
 			if ( storageClasses[i] ) {
@@ -127,5 +127,5 @@
 
 void DeclarationNode::print_FuncSpec( std::ostream & output, DeclarationNode::FuncSpecifiers funcSpec ) {
-	if ( funcSpec.any() ) {								// function specifiers?
+	if ( funcSpec.val != 0 ) {							// function specifiers ?
 		for ( unsigned int i = 0; i < DeclarationNode::NoFuncSpecifier; i += 1 ) {
 			if ( funcSpec[i] ) {
@@ -202,13 +202,13 @@
 
 
-DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClass sc ) {
-	DeclarationNode * newnode = new DeclarationNode;
-	newnode->storageClasses[ sc ] = true;
+DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClasses sc ) {
+	DeclarationNode * newnode = new DeclarationNode;
+	newnode->storageClasses = sc;
 	return newnode;
 } // DeclarationNode::newStorageClass
 
-DeclarationNode * DeclarationNode::newFuncSpecifier( DeclarationNode::FuncSpecifier fs ) {
-	DeclarationNode * newnode = new DeclarationNode;
-	newnode->funcSpecs[ fs ] = true;
+DeclarationNode * DeclarationNode::newFuncSpecifier( DeclarationNode::FuncSpecifiers fs ) {
+	DeclarationNode * newnode = new DeclarationNode;
+	newnode->funcSpecs = fs;
 	return newnode;
 } // DeclarationNode::newFuncSpecifier
@@ -459,6 +459,6 @@
 	const TypeData::TypeQualifiers qsrc = src->typeQualifiers, qdst = dst->typeQualifiers; // optimization
 
-	if ( (qsrc & qdst).any() ) {						// common qualifier ?
-		for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find common qualifiers
+	if ( (qsrc & qdst).any() ) {						// duplicates ?
+		for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find duplicates
 			if ( qsrc[i] && qdst[i] ) {
 				appendError( error, string( "duplicate " ) + DeclarationNode::typeQualifierNames[i] );
@@ -469,6 +469,6 @@
 
 void DeclarationNode::checkSpecifiers( DeclarationNode * src ) {
-	if ( (funcSpecs & src->funcSpecs).any() ) {			// common specifier ?
-		for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find common specifier
+	if ( (funcSpecs.val & src->funcSpecs.val) != 0 ) {		  // duplicates ?
+		for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find duplicates
 			if ( funcSpecs[i] && src->funcSpecs[i] ) {
 				appendError( error, string( "duplicate " ) + DeclarationNode::funcSpecifierNames[i] );
@@ -477,6 +477,6 @@
 	} // if
 
-	if ( storageClasses != 0 && src->storageClasses != 0 ) { // any reason to check ?
-		if ( (storageClasses & src->storageClasses).any() ) { // duplicates ?
+	if ( storageClasses.val != 0 && src->storageClasses.val != 0 ) { // any reason to check ?
+		if ( (storageClasses.val & src->storageClasses.val ) != 0 ) { // duplicates ?
 			for ( unsigned int i = 0; i < NoStorageClass; i += 1 ) { // find duplicates
 				if ( storageClasses[i] && src->storageClasses[i] ) {
@@ -485,8 +485,8 @@
 			} // for
 			// src is the new item being added and has a single bit
-		} else if ( ! src->storageClasses[ Threadlocal ] ) { // conflict ?
-			appendError( error, string( "conflicting " ) + storageClassNames[ffs( storageClasses.to_ulong() ) - 1] +
-						 " & " + storageClassNames[ffs( src->storageClasses.to_ulong() ) - 1] );
-			src->storageClasses.reset();				// FIX to preserve invariant of one basic storage specifier
+		} else if ( ! src->storageClasses.is_threadlocal ) { // conflict ?
+			appendError( error, string( "conflicting " ) + storageClassNames[ffs( storageClasses.val ) - 1] +
+						 " & " + storageClassNames[ffs( src->storageClasses.val ) - 1] );
+			src->storageClasses.val = 0;				// FIX to preserve invariant of one basic storage specifier
 		} // if
 	} // if
@@ -496,6 +496,6 @@
 
 DeclarationNode * DeclarationNode::copySpecifiers( DeclarationNode * q ) {
-	funcSpecs = funcSpecs | q->funcSpecs;
-	storageClasses = storageClasses | q->storageClasses;
+	funcSpecs.val = funcSpecs.val | q->funcSpecs.val;
+	storageClasses.val = storageClasses.val | q->storageClasses.val;
 
 	for ( Attribute *attr: reverseIterate( q->attributes ) ) {
@@ -1058,5 +1058,5 @@
 		//    inline _Noreturn int g( int i );	// allowed
 		//    inline _Noreturn int i;			// disallowed
-		if ( type->kind != TypeData::Function && funcSpecs.any() ) {
+		if ( type->kind != TypeData::Function && funcSpecs.val != 0 ) {
 			throw SemanticError( "invalid function specifier for ", this );
 		} // if
@@ -1068,5 +1068,5 @@
 	//    inlne _Noreturn struct S { ... };		// disallowed
 	//    inlne _Noreturn enum   E { ... };		// disallowed
-	if ( funcSpecs.any() ) {
+	if ( funcSpecs.val != 0 ) {
 		throw SemanticError( "invalid function specifier for ", this );
 	} // if
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 149d297044236702f0f6bdc13eb40ae80acfb760)
+++ src/Parser/ParseNode.h	(revision 08d5507b99eb502f8fb69133c61233301ed6b029)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Mar  7 08:10:53 2017
-// Update Count     : 726
+// Last Modified On : Tue Mar 14 11:05:05 2017
+// Update Count     : 752
 //
 
@@ -204,8 +204,32 @@
 	// These must remain in the same order as the corresponding DeclarationNode names.
 
-	enum StorageClass { Extern, Static, Auto, Register, Threadlocal, NoStorageClass,
-						ExternClass = 1 << Extern, StaticClass = 1 << Static, AutoClass = 1 << Auto, RegisterClass = 1 << Register, ThreadlocalClass = 1 << Threadlocal };
-	enum FuncSpecifier { Inline, Noreturn, Fortran, NoFuncSpecifier,
-						 InlineSpec = 1 << Inline, NoreturnSpec = 1 << Noreturn, FortranSpec = 1 << Fortran };
+	enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NoStorageClass = 5 };
+	union StorageClasses {
+		unsigned int val;
+		struct {
+			bool is_extern : 1;
+			bool is_static : 1;
+			bool is_auto : 1;
+			bool is_register : 1;
+			bool is_threadlocal : 1;
+		};
+		StorageClasses() : val( 0 ) {}
+		StorageClasses( unsigned int val ) : val( val ) {}
+		bool operator[]( unsigned int i ) const { return val & (1 << i); }
+	}; // StorageClasses
+
+	enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NoFuncSpecifier = 3 };
+	union FuncSpecifiers {
+		unsigned int val;
+		struct {
+			bool is_inline : 1;
+			bool is_noreturn : 1;
+			bool is_fortran : 1;
+		};
+		FuncSpecifiers() : val( 0 ) {}
+		FuncSpecifiers( unsigned int val ) : val( val ) {}
+		bool operator[]( unsigned int i ) const { return val & (1 << i); }
+	}; // FuncSpecifiers
+
 	enum TypeQualifier { Const, Restrict, Volatile, Lvalue, Mutex, Atomic, NoTypeQualifier };
 	enum BasicType { Void, Bool, Char, Int, Float, Double, LongDouble, NoBasicType };
@@ -228,6 +252,6 @@
 	static const char * builtinTypeNames[];
 
-	static DeclarationNode * newStorageClass( StorageClass );
-	static DeclarationNode * newFuncSpecifier( FuncSpecifier );
+	static DeclarationNode * newStorageClass( StorageClasses );
+	static DeclarationNode * newFuncSpecifier( FuncSpecifiers );
 	static DeclarationNode * newTypeQualifier( TypeQualifier );
 	static DeclarationNode * newBasicType( BasicType );
@@ -326,9 +350,7 @@
 	TypeData * type;
 
-	typedef std::bitset< DeclarationNode::NoStorageClass > StorageClasses;
 	StorageClasses storageClasses;
 	static void print_StorageClass( std::ostream & output, StorageClasses storageClasses );
 
-	typedef std::bitset< DeclarationNode::NoFuncSpecifier > FuncSpecifiers;
 	FuncSpecifiers funcSpecs;
 	static void print_FuncSpec( std::ostream & output, FuncSpecifiers funcSpecs );
