Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/DeclarationNode.cc	(revision 413ad055e9d11e353853023782b06e6919b37a59)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 20:42:25 2016
-// Update Count     : 232
+// Last Modified On : Sun Aug 28 22:12:44 2016
+// Update Count     : 278
 //
 
@@ -375,5 +375,5 @@
 }
 
-void DeclarationNode::checkQualifiers( TypeData *src, TypeData *dst ) {
+void DeclarationNode::checkQualifiers( const TypeData *src, const TypeData *dst ) {
 	TypeData::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers;
 
@@ -801,5 +801,5 @@
 DeclarationNode *DeclarationNode::extractAggregate() const {
 	if ( type ) {
-		TypeData *ret = type->extractAggregate();
+		TypeData *ret = typeextractAggregate( type );
 		if ( ret ) {
 			DeclarationNode *newnode = new DeclarationNode;
@@ -896,5 +896,5 @@
 	if ( ! error.empty() ) throw SemanticError( error, this );
 	if ( type ) {
-		return type->buildDecl( name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
+		return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
 	} // if
 	if ( ! isInline && ! isNoreturn ) {
@@ -909,16 +909,16 @@
 	switch ( type->kind ) {
 	  case TypeData::Enum:
-		return new EnumInstType( type->buildQualifiers(), type->enumeration->name );
+		return new EnumInstType( buildQualifiers( type ), type->enumeration->name );
 	  case TypeData::Aggregate: {
 		  ReferenceToType *ret;
 		  switch ( type->aggregate->kind ) {
 			case DeclarationNode::Struct:
-			  ret = new StructInstType( type->buildQualifiers(), type->aggregate->name );
+			  ret = new StructInstType( buildQualifiers( type ), type->aggregate->name );
 			  break;
 			case DeclarationNode::Union:
-			  ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name );
+			  ret = new UnionInstType( buildQualifiers( type ), type->aggregate->name );
 			  break;
 			case DeclarationNode::Trait:
-			  ret = new TraitInstType( type->buildQualifiers(), type->aggregate->name );
+			  ret = new TraitInstType( buildQualifiers( type ), type->aggregate->name );
 			  break;
 			default:
@@ -929,10 +929,10 @@
 	  }
 	  case TypeData::Symbolic: {
-		  TypeInstType *ret = new TypeInstType( type->buildQualifiers(), type->symbolic->name, false );
+		  TypeInstType *ret = new TypeInstType( buildQualifiers( type ), type->symbolic->name, false );
 		  buildList( type->symbolic->actuals, ret->get_parameters() );
 		  return ret;
 	  }
 	  default:
-		return type->build();
+		return typebuild( type );
 	} // switch
 }
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/ParseNode.h	(revision 413ad055e9d11e353853023782b06e6919b37a59)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 22:46:24 2016
-// Update Count     : 564
+// Last Modified On : Sun Aug 28 21:14:51 2016
+// Update Count     : 575
 //
 
@@ -243,5 +243,5 @@
 
 	DeclarationNode *addQualifiers( DeclarationNode *);
-	void checkQualifiers( TypeData *, TypeData * );
+	void checkQualifiers( const TypeData *, const TypeData * );
 	DeclarationNode *copyStorageClasses( DeclarationNode *);
 	DeclarationNode *addType( DeclarationNode *);
@@ -308,4 +308,5 @@
 
 Type *buildType( TypeData *type );
+//Type::Qualifiers buildQualifiers( const TypeData::Qualifiers & qualifiers );
 
 static inline Type * maybeMoveBuildType( const DeclarationNode *orig ) {
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/TypeData.cc	(revision 413ad055e9d11e353853023782b06e6919b37a59)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 24 13:46:55 2016
-// Update Count     : 69
+// Last Modified On : Sun Aug 28 18:28:58 2016
+// Update Count     : 223
 //
 
@@ -94,5 +94,5 @@
 		break;
 	} // switch
-}
+} // TypeData::TypeData
 
 TypeData::~TypeData() {
@@ -163,8 +163,8 @@
 		break;
 	} // switch
-}
-
-TypeData *TypeData::clone() const {
-	TypeData *newtype = new TypeData( kind );
+} // TypeData::~TypeData
+
+TypeData * TypeData::clone() const {
+	TypeData * newtype = new TypeData( kind );
 	newtype->qualifiers = qualifiers;
 	newtype->base = maybeClone( base );
@@ -238,5 +238,5 @@
 	} // switch
 	return newtype;
-}
+} // TypeData::clone
 
 void TypeData::print( std::ostream &os, int indent ) const {
@@ -418,36 +418,7 @@
 		assert( false );
 	} // switch
-}
-
-TypeData *TypeData::extractAggregate( bool toplevel ) const {
-	TypeData *ret = 0;
-
-	switch ( kind ) {
-	  case Aggregate:
-		if ( ! toplevel && aggregate->fields ) {
-			ret = clone();
-//			ret->qualifiers.reset();
-		} // if
-		break;
-	  case Enum:
-		if ( ! toplevel && enumeration->constants ) {
-			ret = clone();
-//			ret->qualifiers.reset();
-		} // if
-		break;
-	  case AggregateInst:
-		if ( aggInst->aggregate ) {
-			ret = aggInst->aggregate->extractAggregate( false );
-		} // if
-		break;
-	  default:
-		if ( base ) {
-			ret = base->extractAggregate( false );
-		} // if
-	} // switch
-	return ret;
-}
-
-void buildForall( const DeclarationNode *firstNode, std::list< TypeDecl* > &outputList ) {
+} // TypeData::print
+
+void buildForall( const DeclarationNode * firstNode, std::list< TypeDecl* > &outputList ) {
 	buildList( firstNode, outputList );
 	for ( std::list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
@@ -455,10 +426,10 @@
 			// add assertion parameters to `type' tyvars in reverse order
 			// add dtor:  void ^?{}(T *)
-			FunctionType *dtorType = new FunctionType( Type::Qualifiers(), false );
+			FunctionType * dtorType = new FunctionType( Type::Qualifiers(), false );
 			dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
 			(*i)->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, 0, false, false ) );
 
 			// add copy ctor:  void ?{}(T *, T)
-			FunctionType *copyCtorType = new FunctionType( Type::Qualifiers(), false );
+			FunctionType * copyCtorType = new FunctionType( Type::Qualifiers(), false );
 			copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
 			copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
@@ -466,10 +437,10 @@
 
 			// add default ctor:  void ?{}(T *)
-			FunctionType *ctorType = new FunctionType( Type::Qualifiers(), false );
+			FunctionType * ctorType = new FunctionType( Type::Qualifiers(), false );
 			ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
 			(*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, 0, false, false ) );
 
 			// add assignment operator:  T * ?=?(T *, T)
-			FunctionType *assignType = new FunctionType( Type::Qualifiers(), false );
+			FunctionType * assignType = new FunctionType( Type::Qualifiers(), false );
 			assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
 			assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
@@ -480,89 +451,80 @@
 }
 
-Declaration *TypeData::buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression *bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer *init ) const {
-	if ( kind == TypeData::Function ) {
-		FunctionDecl *decl;
-		if ( function->hasBody ) {
-			if ( function->body ) {
-				Statement *stmt = function->body->build();
-				CompoundStmt *body = dynamic_cast< CompoundStmt* >( stmt );
-				assert( body );
-				decl = new FunctionDecl( name, sc, linkage, buildFunction(), body, isInline, isNoreturn );
-			} else {
-				// std::list< Label > ls;
-				decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list< Label >() ), isInline, isNoreturn );
-			} // if
-		} else {
-			decl = new FunctionDecl( name, sc, linkage, buildFunction(), 0, isInline, isNoreturn );
-		} // if
-		for ( DeclarationNode *cur = function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
-			if ( cur->get_name() != "" ) {
-				decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
-			} // if
-		} // for
-		buildList( function->oldDeclList, decl->get_oldDecls() );
-		return decl;
-	} else if ( kind == TypeData::Aggregate ) {
-		return buildAggregate();
-	} else if ( kind == TypeData::Enum ) {
-		return buildEnum();
-	} else if ( kind == TypeData::Symbolic ) {
-		return buildSymbolic( name, sc );
-	} else if ( kind == TypeData::Variable ) {
-		return buildVariable();
-	} else {
-		return new ObjectDecl( name, sc, linkage, bitfieldWidth, build(), init, std::list< Attribute * >(),  isInline, isNoreturn );
-	} // if
-	return 0;
-}
-
-Type *TypeData::build() const {
-	switch ( kind ) {
-	  case Unknown:
+Type * typebuild( const TypeData * td ) {
+	assert( td );
+	switch ( td->kind ) {
+	  case TypeData::Unknown:
 		// fill in implicit int
-		return new BasicType( buildQualifiers(), BasicType::SignedInt );
-	  case Basic:
-		return buildBasicType();
-	  case Pointer:
-		return buildPointer();
-	  case Array:
-		return buildArray();
-	  case Function:
-		return buildFunction();
-	  case AggregateInst:
-		return buildAggInst();
-	  case EnumConstant:
+		return new BasicType( buildQualifiers( td ), BasicType::SignedInt );
+	  case TypeData::Basic:
+		return buildBasicType( td );
+	  case TypeData::Pointer:
+		return buildPointer( td );
+	  case TypeData::Array:
+		return buildArray( td );
+	  case TypeData::Function:
+		return buildFunction( td );
+	  case TypeData::AggregateInst:
+		return buildAggInst( td );
+	  case TypeData::EnumConstant:
 		// the name gets filled in later -- by SymTab::Validate
-		return new EnumInstType( buildQualifiers(), "" );
-	  case SymbolicInst:
-		return buildSymbolicInst();;
-	  case Tuple:
-		return buildTuple();
-	  case Typeof:
-		return buildTypeof();
-	  case Builtin:
-		return new VarArgsType( buildQualifiers() );
-	  case Attr:
-		return buildAttr();
-	  case Symbolic:
-	  case Enum:
-	  case Aggregate:
-	  case Variable:
+		return new EnumInstType( buildQualifiers( td ), "" );
+	  case TypeData::SymbolicInst:
+		return buildSymbolicInst( td );;
+	  case TypeData::Tuple:
+		return buildTuple( td );
+	  case TypeData::Typeof:
+		return buildTypeof( td );
+	  case TypeData::Builtin:
+		return new VarArgsType( buildQualifiers( td ) );
+	  case TypeData::Attr:
+		return buildAttr( td );
+	  case TypeData::Symbolic:
+	  case TypeData::Enum:
+	  case TypeData::Aggregate:
+	  case TypeData::Variable:
 		assert( false );
 	} // switch
 	return 0;
-}
-
-Type::Qualifiers TypeData::buildQualifiers() const {
+} // typebuild
+
+TypeData * typeextractAggregate( const TypeData * td, bool toplevel ) {
+	TypeData * ret = 0;
+
+	switch ( td->kind ) {
+	  case TypeData::Aggregate:
+		if ( ! toplevel && td->aggregate->fields ) {
+			ret = td->clone();
+		} // if
+		break;
+	  case TypeData::Enum:
+		if ( ! toplevel && td->enumeration->constants ) {
+			ret = td->clone();
+		} // if
+		break;
+	  case TypeData::AggregateInst:
+		if ( td->aggInst->aggregate ) {
+			ret = typeextractAggregate( td->aggInst->aggregate, false );
+		} // if
+		break;
+	  default:
+		if ( td->base ) {
+			ret = typeextractAggregate( td->base, false );
+		} // if
+	} // switch
+	return ret;
+} // typeextractAggregate
+
+Type::Qualifiers buildQualifiers( const TypeData * td ) {
 	Type::Qualifiers q;
-	q.isConst = qualifiers[ DeclarationNode::Const ];
-	q.isVolatile = qualifiers[ DeclarationNode::Volatile ];
-	q.isRestrict = qualifiers[ DeclarationNode::Restrict ];
-	q.isLvalue = qualifiers[ DeclarationNode::Lvalue ];
-	q.isAtomic = qualifiers[ DeclarationNode::Atomic ];;
+	q.isConst = td->qualifiers[ DeclarationNode::Const ];
+	q.isVolatile = td->qualifiers[ DeclarationNode::Volatile ];
+	q.isRestrict = td->qualifiers[ DeclarationNode::Restrict ];
+	q.isLvalue = td->qualifiers[ DeclarationNode::Lvalue ];
+	q.isAtomic = td->qualifiers[ DeclarationNode::Atomic ];;
 	return q;
-}
-
-Type *TypeData::buildBasicType() const {
+} // buildQualifiers
+
+Type * buildBasicType( const TypeData * td ) {
 	static const BasicType::Kind kindMap[] = { BasicType::Char, BasicType::SignedInt, BasicType::Float, BasicType::Double,
 											   BasicType::Char /* void */, BasicType::Bool, BasicType::DoubleComplex,
@@ -573,12 +535,12 @@
 	BasicType::Kind ret;
 
-	for ( std::list< DeclarationNode::BasicType >::const_iterator i = basic->typeSpec.begin(); i != basic->typeSpec.end(); ++i ) {
+	for ( std::list< DeclarationNode::BasicType >::const_iterator i = td->basic->typeSpec.begin(); i != td->basic->typeSpec.end(); ++i ) {
 		if ( ! init ) {
 			init = true;
 			if ( *i == DeclarationNode::Void ) {
-				if ( basic->typeSpec.size() != 1 || ! basic->modifiers.empty() ) {
-					throw SemanticError( "invalid type specifier \"void\" in type: ", this );
+				if ( td->basic->typeSpec.size() != 1 || ! td->basic->modifiers.empty() ) {
+					throw SemanticError( "invalid type specifier \"void\" in type: ", td );
 				} else {
-					return new VoidType( buildQualifiers() );
+					return new VoidType( buildQualifiers( td ) );
 				} // if
 			} else {
@@ -589,5 +551,5 @@
 			  case DeclarationNode::Float:
 				if ( sawDouble ) {
-					throw SemanticError( "invalid type specifier \"float\" in type: ", this );
+					throw SemanticError( "invalid type specifier \"float\" in type: ", td );
 				} else {
 					switch ( ret ) {
@@ -599,5 +561,5 @@
 						break;
 					  default:
-						throw SemanticError( "invalid type specifier \"float\" in type: ", this );
+						throw SemanticError( "invalid type specifier \"float\" in type: ", td );
 					} // switch
 				} // if
@@ -605,5 +567,5 @@
 			  case DeclarationNode::Double:
 				if ( sawDouble ) {
-					throw SemanticError( "duplicate type specifier \"double\" in type: ", this );
+					throw SemanticError( "duplicate type specifier \"double\" in type: ", td );
 				} else {
 					switch ( ret ) {
@@ -612,5 +574,5 @@
 						break;
 					  default:
-						throw SemanticError( "invalid type specifier \"double\" in type: ", this );
+						throw SemanticError( "invalid type specifier \"double\" in type: ", td );
 					} // switch
 				} // if
@@ -625,5 +587,5 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type specifier \"_Complex\" in type: ", this );
+					throw SemanticError( "invalid type specifier \"_Complex\" in type: ", td );
 				} // switch
 				break;
@@ -637,9 +599,9 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type specifier \"_Imaginary\" in type: ", this );
+					throw SemanticError( "invalid type specifier \"_Imaginary\" in type: ", td );
 				} // switch
 				break;
 			  default:
-				throw SemanticError( std::string( "invalid type specifier \"" ) + DeclarationNode::basicTypeName[ *i ] + "\" in type: ", this );
+				throw SemanticError( std::string( "invalid type specifier \"" ) + DeclarationNode::basicTypeName[ *i ] + "\" in type: ", td );
 			} // switch
 		} // if
@@ -649,5 +611,5 @@
 	} // for
 
-	for ( std::list< DeclarationNode::Modifier >::const_iterator i = basic->modifiers.begin(); i != basic->modifiers.end(); ++i ) {
+	for ( std::list< DeclarationNode::Modifier >::const_iterator i = td->basic->modifiers.begin(); i != td->basic->modifiers.end(); ++i ) {
 		switch ( *i ) {
 		  case DeclarationNode::Long:
@@ -679,5 +641,5 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type modifier \"long\" in type: ", this );
+					throw SemanticError( "invalid type modifier \"long\" in type: ", td );
 				} // switch
 			} // if
@@ -696,5 +658,5 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type modifier \"short\" in type: ", this );
+					throw SemanticError( "invalid type modifier \"short\" in type: ", td );
 				} // switch
 			} // if
@@ -705,5 +667,5 @@
 				ret = BasicType::SignedInt;
 			} else if ( sawSigned ) {
-				throw SemanticError( "duplicate type modifer \"signed\" in type: ", this );
+				throw SemanticError( "duplicate type modifer \"signed\" in type: ", td );
 			} else {
 				switch ( ret ) {
@@ -721,5 +683,5 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type modifer \"signed\" in type: ", this );
+					throw SemanticError( "invalid type modifer \"signed\" in type: ", td );
 				} // switch
 			} // if
@@ -730,5 +692,5 @@
 				ret = BasicType::UnsignedInt;
 			} else if ( sawSigned ) {
-				throw SemanticError( "invalid type modifer \"unsigned\" in type: ", this );
+				throw SemanticError( "invalid type modifer \"unsigned\" in type: ", td );
 			} else {
 				switch ( ret ) {
@@ -749,5 +711,5 @@
 					break;
 				  default:
-					throw SemanticError( "invalid type modifer \"unsigned\" in type: ", this );
+					throw SemanticError( "invalid type modifer \"unsigned\" in type: ", td );
 				} // switch
 			} // if
@@ -760,53 +722,215 @@
 	} // for
 
-	BasicType *bt;
+	BasicType * bt;
 	if ( ! init ) {
-		bt = new BasicType( buildQualifiers(), BasicType::SignedInt );
+		bt = new BasicType( buildQualifiers( td ), BasicType::SignedInt );
 	} else {
-		bt = new BasicType( buildQualifiers(), ret );
+		bt = new BasicType( buildQualifiers( td ), ret );
 	} // if
-	buildForall( forall, bt->get_forall() );
+	buildForall( td->forall, bt->get_forall() );
 	return bt;
-}
-
-
-PointerType *TypeData::buildPointer() const {
-	PointerType *pt;
-	if ( base ) {
-		pt = new PointerType( buildQualifiers(), base->build() );
+} // buildBasicType
+
+PointerType * buildPointer( const TypeData * td ) {
+	PointerType * pt;
+	if ( td->base ) {
+		pt = new PointerType( buildQualifiers( td ), typebuild( td->base ) );
 	} else {
-		pt = new PointerType( buildQualifiers(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
+		pt = new PointerType( buildQualifiers( td ), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
 	} // if
-	buildForall( forall, pt->get_forall() );
+	buildForall( td->forall, pt->get_forall() );
 	return pt;
-}
-
-ArrayType *TypeData::buildArray() const {
-	ArrayType *at;
-	if ( base ) {
-		at = new ArrayType( buildQualifiers(), base->build(), maybeBuild< Expression >( array->dimension ),
-							array->isVarLen, array->isStatic );
+} // buildPointer
+
+ArrayType * buildArray( const TypeData * td ) {
+	ArrayType * at;
+	if ( td->base ) {
+		at = new ArrayType( buildQualifiers( td ), typebuild( td->base ), maybeBuild< Expression >( td->array->dimension ),
+							td->array->isVarLen, td->array->isStatic );
 	} else {
-		at = new ArrayType( buildQualifiers(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ),
-							maybeBuild< Expression >( array->dimension ), array->isVarLen, array->isStatic );
+		at = new ArrayType( buildQualifiers( td ), new BasicType( Type::Qualifiers(), BasicType::SignedInt ),
+							maybeBuild< Expression >( td->array->dimension ), td->array->isVarLen, td->array->isStatic );
 	} // if
-	buildForall( forall, at->get_forall() );
+	buildForall( td->forall, at->get_forall() );
 	return at;
-}
-
-FunctionType *TypeData::buildFunction() const {
-	assert( kind == Function );
-	bool hasEllipsis = function->params ? function->params->get_hasEllipsis() : true;
-	if ( ! function->params ) hasEllipsis = ! function->newStyle;
-	FunctionType *ft = new FunctionType( buildQualifiers(), hasEllipsis );
-	buildList( function->params, ft->get_parameters() );
-	buildForall( forall, ft->get_forall() );
-	if ( base ) {
-		switch ( base->kind ) {
-		  case Tuple:
-			buildList( base->tuple->members, ft->get_returnVals() );
+} // buildPointer
+
+AggregateDecl * buildAggregate( const TypeData * td ) {
+	assert( td->kind == TypeData::Aggregate );
+	AggregateDecl * at;
+	switch ( td->aggregate->kind ) {
+	  case DeclarationNode::Struct:
+		at = new StructDecl( td->aggregate->name );
+		buildForall( td->aggregate->params, at->get_parameters() );
+		break;
+	  case DeclarationNode::Union:
+		at = new UnionDecl( td->aggregate->name );
+		buildForall( td->aggregate->params, at->get_parameters() );
+		break;
+	  case DeclarationNode::Trait:
+		at = new TraitDecl( td->aggregate->name );
+		buildList( td->aggregate->params, at->get_parameters() );
+		break;
+	  default:
+		assert( false );
+	} // switch
+
+	buildList( td->aggregate->fields, at->get_members() );
+	at->set_body( td->aggregate->body );
+
+	return at;
+} // buildAggregate
+
+ReferenceToType * buildAggInst( const TypeData * td ) {
+	assert( td->kind == TypeData::AggregateInst );
+
+	ReferenceToType * ret;
+	if ( td->aggInst->aggregate->kind == TypeData::Enum ) {
+		ret = new EnumInstType( buildQualifiers( td ), td->aggInst->aggregate->enumeration->name );
+	} else {
+		assert( td->aggInst->aggregate->kind == TypeData::Aggregate );
+		switch ( td->aggInst->aggregate->aggregate->kind ) {
+		  case DeclarationNode::Struct:
+			ret = new StructInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
+			break;
+		  case DeclarationNode::Union:
+			ret = new UnionInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
+			break;
+		  case DeclarationNode::Trait:
+			ret = new TraitInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
 			break;
 		  default:
-			ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( base->buildDecl( "", DeclarationNode::NoStorageClass, 0, false, false, LinkageSpec::Cforall ) ) );
+			assert( false );
+		} // switch
+	} // if
+	buildList( td->aggInst->params, ret->get_parameters() );
+	buildForall( td->forall, ret->get_forall() );
+	return ret;
+} // buildAggInst
+
+NamedTypeDecl * buildSymbolic( const TypeData * td, const std::string & name, DeclarationNode::StorageClass sc ) {
+	assert( td->kind == TypeData::Symbolic );
+	NamedTypeDecl * ret;
+	assert( td->base );
+	if ( td->symbolic->isTypedef ) {
+		ret = new TypedefDecl( name, sc, typebuild( td->base ) );
+	} else {
+		ret = new TypeDecl( name, sc, typebuild( td->base ), TypeDecl::Any );
+	} // if
+	buildList( td->symbolic->params, ret->get_parameters() );
+	buildList( td->symbolic->assertions, ret->get_assertions() );
+	return ret;
+} // buildSymbolic
+
+TypeDecl * buildVariable( const TypeData * td ) {
+	assert( td->kind == TypeData::Variable );
+	static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
+
+	TypeDecl * ret = new TypeDecl( td->variable->name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable->tyClass ] );
+	buildList( td->variable->assertions, ret->get_assertions() );
+	return ret;
+} // buildSymbolic
+
+EnumDecl * buildEnum( const TypeData * td ) {
+	assert( td->kind == TypeData::Enum );
+	EnumDecl * ret = new EnumDecl( td->enumeration->name );
+	buildList( td->enumeration->constants, ret->get_members() );
+	std::list< Declaration * >::iterator members = ret->get_members().begin();
+	for ( const DeclarationNode * cur = td->enumeration-> constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
+		if ( cur->has_enumeratorValue() ) {
+			ObjectDecl * member = dynamic_cast< ObjectDecl * >(* members);
+			member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ), std::list< Expression * >() ) );
+		} // if
+	} // for
+	return ret;
+} // buildEnum
+
+TypeInstType * buildSymbolicInst( const TypeData * td ) {
+	assert( td->kind == TypeData::SymbolicInst );
+	TypeInstType * ret = new TypeInstType( buildQualifiers( td ), td->symbolic->name, false );
+	buildList( td->symbolic->actuals, ret->get_parameters() );
+	buildForall( td->forall, ret->get_forall() );
+	return ret;
+} // buildSymbolicInst
+
+TupleType * buildTuple( const TypeData * td ) {
+	assert( td->kind == TypeData::Tuple );
+	TupleType * ret = new TupleType( buildQualifiers( td ) );
+	buildTypeList( td->tuple->members, ret->get_types() );
+	buildForall( td->forall, ret->get_forall() );
+	return ret;
+} // buildTuple
+
+TypeofType * buildTypeof( const TypeData * td ) {
+	assert( td->kind == TypeData::Typeof );
+	assert( td->typeexpr );
+	assert( td->typeexpr->expr );
+	return new TypeofType( buildQualifiers( td ), td->typeexpr->expr->build() );
+} // buildTypeof
+
+AttrType * buildAttr( const TypeData * td ) {
+	assert( td->kind == TypeData::Attr );
+	assert( td->attr );
+	AttrType * ret;
+	if ( td->attr->expr ) {
+		ret = new AttrType( buildQualifiers( td ), td->attr->name, td->attr->expr->build() );
+	} else {
+		assert( td->attr->type );
+		ret = new AttrType( buildQualifiers( td ), td->attr->name, td->attr->type->buildType() );
+	} // if
+	return ret;
+} // buildAttr
+
+Declaration * buildDecl( const TypeData * td, std::string name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer * init ) {
+	if ( td->kind == TypeData::Function ) {
+		FunctionDecl * decl;
+		if ( td->function->hasBody ) {
+			if ( td->function->body ) {
+				Statement * stmt = td->function->body->build();
+				CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
+				assert( body );
+				decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn );
+			} else {
+				// std::list< Label > ls;
+				decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), new CompoundStmt( std::list< Label >() ), isInline, isNoreturn );
+			} // if
+		} else {
+			decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), 0, isInline, isNoreturn );
+		} // if
+		for ( DeclarationNode * cur = td->function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
+			if ( cur->get_name() != "" ) {
+				decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
+			} // if
+		} // for
+		buildList( td->function->oldDeclList, decl->get_oldDecls() );
+		return decl;
+	} else if ( td->kind == TypeData::Aggregate ) {
+		return buildAggregate( td );
+	} else if ( td->kind == TypeData::Enum ) {
+		return buildEnum( td );
+	} else if ( td->kind == TypeData::Symbolic ) {
+		return buildSymbolic( td, name, sc );
+	} else if ( td->kind == TypeData::Variable ) {
+		return buildVariable( td );
+	} else {
+		return new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, std::list< Attribute * >(), isInline, isNoreturn );
+	} // if
+	return 0;
+} // buildDecl
+
+FunctionType * buildFunction( const TypeData * td ) {
+	assert( td->kind == TypeData::Function );
+	bool hasEllipsis = td->function->params ? td->function->params->get_hasEllipsis() : true;
+	if ( ! td->function->params ) hasEllipsis = ! td->function->newStyle;
+	FunctionType * ft = new FunctionType( buildQualifiers( td ), hasEllipsis );
+	buildList( td->function->params, ft->get_parameters() );
+	buildForall( td->forall, ft->get_forall() );
+	if ( td->base ) {
+		switch ( td->base->kind ) {
+		  case TypeData::Tuple:
+			buildList( td->base->tuple->members, ft->get_returnVals() );
+			break;
+		  default:
+			ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, 0, false, false, LinkageSpec::Cforall ) ) );
 		} // switch
 	} else {
@@ -814,131 +938,5 @@
 	} // if
 	return ft;
-}
-
-AggregateDecl *TypeData::buildAggregate() const {
-	assert( kind == Aggregate );
-	AggregateDecl *at;
-	switch ( aggregate->kind ) {
-	  case DeclarationNode::Struct:
-		at = new StructDecl( aggregate->name );
-		buildForall( aggregate->params, at->get_parameters() );
-		break;
-	  case DeclarationNode::Union:
-		at = new UnionDecl( aggregate->name );
-		buildForall( aggregate->params, at->get_parameters() );
-		break;
-	  case DeclarationNode::Trait:
-		at = new TraitDecl( aggregate->name );
-		buildList( aggregate->params, at->get_parameters() );
-		break;
-	  default:
-		assert( false );
-	} // switch
-
-	buildList( aggregate->fields, at->get_members() );
-	at->set_body( aggregate->body );
-
-	return at;
-}
-
-ReferenceToType *TypeData::buildAggInst() const {
-	assert( kind == AggregateInst );
-
-	ReferenceToType *ret;
-	if ( aggInst->aggregate->kind == Enum ) {
-		ret = new EnumInstType( buildQualifiers(), aggInst->aggregate->enumeration->name );
-	} else {
-		assert( aggInst->aggregate->kind == Aggregate );
-		switch ( aggInst->aggregate->aggregate->kind ) {
-		  case DeclarationNode::Struct:
-			ret = new StructInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-			break;
-		  case DeclarationNode::Union:
-			ret = new UnionInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-			break;
-		  case DeclarationNode::Trait:
-			ret = new TraitInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-			break;
-		  default:
-			assert( false );
-		} // switch
-	} // if
-	buildList( aggInst->params, ret->get_parameters() );
-	buildForall( forall, ret->get_forall() );
-	return ret;
-}
-
-NamedTypeDecl *TypeData::buildSymbolic( const std::string &name, DeclarationNode::StorageClass sc ) const {
-	assert( kind == Symbolic );
-	NamedTypeDecl *ret;
-	if ( symbolic->isTypedef ) {
-		ret = new TypedefDecl( name, sc, maybeBuild< Type >( base ) );
-	} else {
-		ret = new TypeDecl( name, sc, maybeBuild< Type >( base ), TypeDecl::Any );
-	} // if
-	buildList( symbolic->params, ret->get_parameters() );
-	buildList( symbolic->assertions, ret->get_assertions() );
-	return ret;
-}
-
-TypeDecl *TypeData::buildVariable() const {
-	assert( kind == Variable );
-	static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
-
-	TypeDecl *ret = new TypeDecl( variable->name, DeclarationNode::NoStorageClass, 0, kindMap[ variable->tyClass ] );
-	buildList( variable->assertions, ret->get_assertions() );
-	return ret;
-}
-
-EnumDecl *TypeData::buildEnum() const {
-	assert( kind == Enum );
-	EnumDecl *ret = new EnumDecl( enumeration->name );
-	buildList( enumeration->constants, ret->get_members() );
-	std::list< Declaration * >::iterator members = ret->get_members().begin();
-	for ( const DeclarationNode *cur = enumeration->constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
-		if ( cur->has_enumeratorValue() ) {
-			ObjectDecl *member = dynamic_cast< ObjectDecl * >(*members);
-			member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ), std::list< Expression * >() ) );
-		} // if
-	} // for
-	return ret;
-}
-
-TypeInstType *TypeData::buildSymbolicInst() const {
-	assert( kind == SymbolicInst );
-	TypeInstType *ret = new TypeInstType( buildQualifiers(), symbolic->name, false );
-	buildList( symbolic->actuals, ret->get_parameters() );
-	buildForall( forall, ret->get_forall() );
-	return ret;
-}
-
-TupleType *TypeData::buildTuple() const {
-	assert( kind == Tuple );
-	TupleType *ret = new TupleType( buildQualifiers() );
-	buildTypeList( tuple->members, ret->get_types() );
-	buildForall( forall, ret->get_forall() );
-	return ret;
-}
-
-TypeofType *TypeData::buildTypeof() const {
-	assert( kind == Typeof );
-	assert( typeexpr );
-	assert( typeexpr->expr );
-	TypeofType *ret = new TypeofType( buildQualifiers(), typeexpr->expr->build() );
-	return ret;
-}
-
-AttrType *TypeData::buildAttr() const {
-	assert( kind == Attr );
-	assert( attr );
-	AttrType *ret;
-	if ( attr->expr ) {
-		ret = new AttrType( buildQualifiers(), attr->name, attr->expr->build() );
-	} else {
-		assert( attr->type );
-		ret = new AttrType( buildQualifiers(), attr->name, attr->type->buildType() );
-	} // if
-	return ret;
-}
+} // buildFunction
 
 // Local Variables: //
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/TypeData.h	(revision 413ad055e9d11e353853023782b06e6919b37a59)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 17:34:06 2016
-// Update Count     : 26
+// Last Modified On : Sun Aug 28 22:39:00 2016
+// Update Count     : 85
 //
 
@@ -25,17 +25,4 @@
 	enum Kind { Unknown, Basic, Pointer, Array, Function, Aggregate, AggregateInst,
 				Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr } kind;
-
-	TypeData( Kind k = Unknown );
-	~TypeData();
-	void print( std::ostream &, int indent = 0 ) const;
-	TypeData * clone() const;
-
-	Type * build() const;
-	FunctionType * buildFunction() const;
-
-	TypeData * base;
-	typedef std::bitset< DeclarationNode::NoOfQualifier > Qualifiers;
-	Qualifiers qualifiers;
-	DeclarationNode * forall;
 
 	struct Basic_t {
@@ -110,4 +97,9 @@
 	};
 
+	TypeData * base;
+	typedef std::bitset< DeclarationNode::NoOfQualifier > Qualifiers;
+	Qualifiers qualifiers;
+	DeclarationNode * forall;
+
 	union {
 		Basic_t * basic;
@@ -125,22 +117,27 @@
 	};
 
-	TypeData * extractAggregate( bool toplevel = true ) const;
-	// helper function for DeclNodeImpl::build
-	Declaration * buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer * init = 0 ) const;
-	// helper functions for build()
-	Type::Qualifiers buildQualifiers() const;
-	Type * buildBasicType() const;
-	PointerType * buildPointer() const;
-	ArrayType * buildArray() const;
-	AggregateDecl * buildAggregate() const;
-	ReferenceToType * buildAggInst() const;
-	NamedTypeDecl * buildSymbolic( const std::string &name, DeclarationNode::StorageClass sc ) const;
-	TypeDecl* buildVariable() const;
-	EnumDecl* buildEnum() const;
-	TypeInstType * buildSymbolicInst() const;
-	TupleType * buildTuple() const;
-	TypeofType * buildTypeof() const;
-	AttrType * buildAttr() const;
+	TypeData( Kind k = Unknown );
+	~TypeData();
+	void print( std::ostream &, int indent = 0 ) const;
+	TypeData * clone() const;
 };
+
+Type * typebuild( const TypeData * );
+TypeData * typeextractAggregate( const TypeData * td, bool toplevel = true );
+Type::Qualifiers buildQualifiers( const TypeData * td );
+Type * buildBasicType( const TypeData * );
+PointerType * buildPointer( const TypeData * );
+ArrayType * buildArray( const TypeData * );
+AggregateDecl * buildAggregate( const TypeData * );
+ReferenceToType * buildAggInst( const TypeData * );
+NamedTypeDecl * buildSymbolic( const TypeData *, const std::string &name, DeclarationNode::StorageClass sc );
+TypeDecl * buildVariable( const TypeData * );
+EnumDecl * buildEnum( const TypeData * );
+TypeInstType * buildSymbolicInst( const TypeData * );
+TupleType * buildTuple( const TypeData * );
+TypeofType * buildTypeof( const TypeData * );
+AttrType * buildAttr( const TypeData * );
+Declaration * buildDecl( const TypeData *, std::string, DeclarationNode::StorageClass, Expression *, bool isInline, bool isNoreturn, LinkageSpec::Spec, Initializer * init = 0 );
+FunctionType * buildFunction( const TypeData * );
 
 #endif // TYPEDATA_H
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/parser.yy	(revision 413ad055e9d11e353853023782b06e6919b37a59)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 21:24:19 2016
-// Update Count     : 1963
+// Last Modified On : Fri Aug 26 16:45:44 2016
+// Update Count     : 1964
 //
 
@@ -619,5 +619,5 @@
 	| ERassign									{ $$ = OperKinds::ERAssn; }
 	| ORassign									{ $$ = OperKinds::OrAssn; }
-;
+	;
 
 tuple:													// CFA, tuple
