Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/CodeGen/FixNames.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -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 07:50:30 2017
-// Update Count     : 16
+// Last Modified On : Wed Jun 21 14:22:59 2017
+// Update Count     : 19
 //
 
@@ -114,5 +114,5 @@
 				throw SemanticError("Main expected to have 0, 2 or 3 arguments\n", functionDecl); 
 			}
-			functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), "0") ) ) );
+			functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new ConstantExpr( Constant::from_int( 0 ) ) ) );
 			CodeGen::FixMain::registerMain( functionDecl );
 		}
Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Common/PassVisitor.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -18,5 +18,14 @@
 // Templated visitor type
 // To use declare a PassVisitor< YOUR VISITOR TYPE >
-// The visitor type should specify the previsit/postvisit for types that are desired.
+// The visitor type should specify the previsit/postvisit/premutate/postmutate for types that are desired.
+// Note: previsit/postvisit/premutate/postmutate must be **public** members
+//
+// Several additional features are available through inheritance
+// | WithTypeSubstitution - provides polymorphic TypeSubstitution * env for the current expression
+// | WithStmtsToAdd       - provides the ability to insert statements before or after the current statement by adding new statements into
+//                          stmtsToAddBefore or stmtsToAddAfter respectively.
+// | WithShortCircuiting  - provides the ability to skip visiting child nodes; set visit_children to false in pre{visit,mutate} to skip visiting children
+// | WithScopes           - provides the ability to save/restore data like a LIFO stack; to save, call GuardValue with the variable to save, the variable
+//                          will automatically be restored to its previous value after the corresponding postvisit/postmutate teminates.
 //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 template< typename pass_type >
@@ -28,5 +37,11 @@
 	PassVisitor(Args &&... args)
 		: pass( std::forward<Args>( args )... )
-	{}
+	{
+		typedef PassVisitor<pass_type> this_t;
+		this_t * const * visitor = visitor_impl(pass, 0);
+		if(visitor) {
+			*const_cast<this_t **>( visitor ) = this;
+		}
+	}
 
 	virtual ~PassVisitor() = default;
@@ -86,5 +101,4 @@
 	virtual void visit( ConstructorExpr * ctorExpr ) override final;
 	virtual void visit( CompoundLiteralExpr *compLitExpr ) override final;
-	virtual void visit( UntypedValofExpr *valofExpr ) override final;
 	virtual void visit( RangeExpr *rangeExpr ) override final;
 	virtual void visit( UntypedTupleExpr *tupleExpr ) override final;
@@ -172,5 +186,4 @@
 	virtual Expression* mutate( ConstructorExpr *ctorExpr ) override final;
 	virtual Expression* mutate( CompoundLiteralExpr *compLitExpr ) override final;
-	virtual Expression* mutate( UntypedValofExpr *valofExpr ) override final;
 	virtual Expression* mutate( RangeExpr *rangeExpr ) override final;
 	virtual Expression* mutate( UntypedTupleExpr *tupleExpr ) override final;
@@ -207,4 +220,7 @@
 
 private:
+	template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
+	template<typename pass_t> friend void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
+
 	template<typename node_type> void call_previsit ( node_type * node ) { previsit_impl ( pass, node, 0 ); }
 	template<typename node_type> void call_postvisit( node_type * node ) { postvisit_impl( pass, node, 0 ); }
@@ -218,11 +234,17 @@
 	void set_env( TypeSubstitution * env ) { set_env_impl( pass, env, 0); }
 
-	void visitStatementList( std::list< Statement* > &statements );
+	template< typename func_t >
+	void handleStatementList( std::list< Statement * > & statements, func_t func );
+	void visitStatementList ( std::list< Statement* > &statements );
 	void mutateStatementList( std::list< Statement* > &statements );
 
-	Statement * visitStatement( Statement * stmt );
+	template< typename func_t >
+	Statement * handleStatement( Statement * stmt, func_t func );
+	Statement * visitStatement ( Statement * stmt );
 	Statement * mutateStatement( Statement * stmt );
 
-	void visitExpression( Expression * expr );
+	template< typename func_t >
+	Expression * handleExpression( Expression * expr, func_t func );
+	Expression * visitExpression ( Expression * expr );
 	Expression * mutateExpression( Expression * expr );
 
@@ -231,6 +253,8 @@
 	std::list< Statement* > * 	get_beforeStmts() { return stmtsToAddBefore_impl( pass, 0); }
 	std::list< Statement* > * 	get_afterStmts () { return stmtsToAddAfter_impl ( pass, 0); }
-	bool visit_children() { bool* skip = skip_children_impl(pass, 0); return ! (skip && *skip); }
-	void reset_visit() { bool* skip = skip_children_impl(pass, 0); if(skip) *skip = false; }
+	std::list< Declaration* > * 	get_beforeDecls() { return declsToAddBefore_impl( pass, 0); }
+	std::list< Declaration* > * 	get_afterDecls () { return declsToAddAfter_impl ( pass, 0); }
+
+	void set_visit_children( bool& ref ) { bool_ref * ptr = visit_children_impl(pass, 0); if(ptr) ptr->set( ref ); }
 
 	guard_value_impl init_guard() {
@@ -271,5 +295,4 @@
 	std::list< Statement* > stmtsToAddAfter;
 };
-
 class WithShortCircuiting {
 protected:
@@ -278,5 +301,5 @@
 
 public:
-	bool skip_children;
+	bool_ref visit_children;
 };
 
@@ -297,4 +320,13 @@
 };
 
+template<typename pass_type>
+class WithVisitorRef {
+protected:
+	WithVisitorRef() = default;
+	~WithVisitorRef() = default;
+
+public:
+	PassVisitor<pass_type> * const visitor;
+};
 
 #include "PassVisitor.impl.h"
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Common/PassVisitor.impl.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -4,7 +4,8 @@
 	__attribute__((unused))                   \
 	const auto & guard = init_guard();        \
+	bool visit_children = true;               \
+	set_visit_children( visit_children );	\
 	call_previsit( node );                    \
-	if( visit_children() ) {                  \
-		reset_visit();                      \
+	if( visit_children ) {                    \
 
 #define VISIT_END( node )                       \
@@ -15,7 +16,8 @@
 	__attribute__((unused))                   \
 	const auto & guard = init_guard();        \
+	bool visit_children = true;               \
+	set_visit_children( visit_children );	\
 	call_premutate( node );                   \
-	if( visit_children() ) {                  \
-		reset_visit();                      \
+	if( visit_children ) {                    \
 
 #define MUTATE_END( type, node )                \
@@ -42,23 +44,89 @@
 }
 
-typedef std::list< Statement * > StmtList_t;
-
-template< typename pass_type >
-void PassVisitor< pass_type >::visitStatementList( std::list< Statement * > & statements ) {
+typedef std::list< Statement   * > StmtList_t;
+typedef std::list< Declaration * > DeclList_t;
+
+template<typename iterator_t>
+static inline void splice( iterator_t it, DeclList_t * decls ) {
+	std::transform(
+		decls->begin(),
+		decls->end(),
+		it,
+		[](Declaration * decl) -> auto {
+			return new DeclStmt( noLabels, decl );
+		}
+	);
+	decls->clear();
+}
+
+template< typename pass_type >
+static inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {
+
+	DeclList_t* beforeDecls = visitor.get_beforeDecls();
+	DeclList_t* afterDecls  = visitor.get_afterDecls();
+
+	for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
+		// splice in new declarations after previous decl
+		if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }	
+
+		if ( i == decls.end() ) break;
+
+		// run mutator on declaration
+		maybeAccept( *i, visitor );
+
+		// splice in new declarations before current decl
+		if ( !empty( beforeDecls ) ) { decls.splice( i, *beforeDecls ); }
+	}
+}
+
+template< typename pass_type >
+static inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {
+
+	DeclList_t* beforeDecls = mutator.get_beforeDecls();
+	DeclList_t* afterDecls  = mutator.get_afterDecls();
+
+	for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
+		// splice in new declarations after previous decl
+		if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }	
+
+		if ( i == decls.end() ) break;
+
+		// run mutator on declaration
+		*i = maybeMutate( *i, mutator );
+
+		// splice in new declarations before current decl
+		if ( !empty( beforeDecls ) ) { decls.splice( i, *beforeDecls ); }
+	}
+}
+
+template< typename pass_type >
+template< typename func_t >
+void PassVisitor< pass_type >::handleStatementList( std::list< Statement * > & statements, func_t func ) {
 	SemanticError errors;
 
 	StmtList_t* beforeStmts = get_beforeStmts();
 	StmtList_t* afterStmts  = get_afterStmts();
+	DeclList_t* beforeDecls = get_beforeDecls();
+	DeclList_t* afterDecls  = get_afterDecls();
 
 	for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
+
+		if ( !empty( afterDecls ) ) { splice( std::inserter( statements, i ), afterDecls ); }
 		if ( !empty( afterStmts ) ) { statements.splice( i, *afterStmts ); }
+
 		try {
-			(*i)->accept( *this );
+			func( *i );
+			assert(( empty( beforeStmts ) && empty( afterStmts ))
+			    || ( empty( beforeDecls ) && empty( afterDecls )) );
+
 		} catch ( SemanticError &e ) {
 			errors.append( e );
 		}
+
+		if ( !empty( beforeDecls ) ) { splice( std::inserter( statements, i ), beforeDecls ); }
 		if ( !empty( beforeStmts ) ) { statements.splice( i, *beforeStmts ); }
 	}
 
+	if ( !empty( afterDecls ) ) { splice( std::back_inserter( statements ), afterDecls); }
 	if ( !empty( afterStmts ) ) { statements.splice( statements.end(), *afterStmts ); }
 	if ( !errors.isEmpty() ) { throw errors; }
@@ -66,41 +134,44 @@
 
 template< typename pass_type >
+void PassVisitor< pass_type >::visitStatementList( std::list< Statement * > & statements ) {
+	handleStatementList( statements, [this]( Statement * stmt) {
+		stmt->accept( *this );
+	});
+}
+
+template< typename pass_type >
 void PassVisitor< pass_type >::mutateStatementList( std::list< Statement * > & statements ) {
-	SemanticError errors;
+	handleStatementList( statements, [this]( Statement *& stmt) {
+		stmt = stmt->acceptMutator( *this );
+	});
+}
+
+
+template< typename pass_type >
+template< typename func_t >
+Statement * PassVisitor< pass_type >::handleStatement( Statement * stmt, func_t func ) {
+	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
+	ValueGuardPtr< TypeSubstitution * >  oldEnv        ( get_env_ptr    () );
+	ValueGuardPtr< DeclList_t >          oldBeforeDecls( get_beforeDecls() );
+	ValueGuardPtr< DeclList_t >          oldAfterDecls ( get_afterDecls () );
+	ValueGuardPtr< StmtList_t >          oldBeforeStmts( get_beforeStmts() );
+	ValueGuardPtr< StmtList_t >          oldAfterStmts ( get_afterStmts () );
+
+	Statement *newStmt = func( stmt );
 
 	StmtList_t* beforeStmts = get_beforeStmts();
 	StmtList_t* afterStmts  = get_afterStmts();
-
-	for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
-		if ( !empty( afterStmts ) ) { statements.splice( i, *afterStmts ); }
-		try {
-			*i = (*i)->acceptMutator( *this );
-		} catch ( SemanticError &e ) {
-			errors.append( e );
-		}
-		if ( !empty( beforeStmts ) ) { statements.splice( i, *beforeStmts ); }
-	}
-
-	if ( !empty( afterStmts ) ) { statements.splice( statements.end(), *afterStmts ); }
-	if ( !errors.isEmpty() ) { throw errors; }
-}
-
-template< typename pass_type >
-Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
-	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-	ValueGuardPtr< TypeSubstitution * >      oldEnv        ( get_env_ptr() );
-	ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() );
-	ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () );
-
-	maybeAccept( stmt, *this );
-
-	StmtList_t* beforeStmts = get_beforeStmts();
-	StmtList_t* afterStmts  = get_afterStmts();
-
-	if( empty(beforeStmts) && empty(afterStmts) ) { return stmt; }
+	DeclList_t* beforeDecls = get_beforeDecls();
+	DeclList_t* afterDecls  = get_afterDecls();
+
+	if( empty(beforeStmts) && empty(afterStmts) && empty(beforeDecls) && empty(afterDecls) ) { return newStmt; }
+	assert(( empty( beforeStmts ) && empty( afterStmts ))
+	    || ( empty( beforeDecls ) && empty( afterDecls )) );
 
 	CompoundStmt *compound = new CompoundStmt( noLabels );
+	if( !empty(beforeDecls) ) { splice( std::back_inserter( compound->get_kids() ), beforeDecls ); }
 	if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); }
-	compound->get_kids().push_back( stmt );
+	compound->get_kids().push_back( newStmt );
+	if( !empty(afterDecls) ) { splice( std::back_inserter( compound->get_kids() ), afterDecls ); }
 	if( !empty(afterStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *afterStmts ); }
 	return compound;
@@ -108,29 +179,22 @@
 
 template< typename pass_type >
+Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
+	return handleStatement( stmt, [this]( Statement * stmt ) {
+		maybeAccept( stmt, *this ); 
+		return stmt;
+	});
+}
+
+template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutateStatement( Statement * stmt ) {
-	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-	ValueGuardPtr< TypeSubstitution * >      oldEnv        ( get_env_ptr() );
-	ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() );
-	ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () );
-
-	Statement *newStmt = maybeMutate( stmt, *this );
-
-	StmtList_t* beforeStmts = get_beforeStmts();
-	StmtList_t* afterStmts  = get_afterStmts();
-
-	if( empty(beforeStmts) && empty(afterStmts) ) { return newStmt; }
-
-	CompoundStmt *compound = new CompoundStmt( noLabels );
-	if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); }
-	compound->get_kids().push_back( newStmt );
-	if( !empty(afterStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *afterStmts ); }
-	return compound;
-}
-
-
-
-template< typename pass_type >
-void PassVisitor< pass_type >::visitExpression( Expression * expr ) {
-	if( !expr ) return;
+	return handleStatement( stmt, [this]( Statement * stmt ) {
+	 	return maybeMutate( stmt, *this );
+	});
+}
+
+template< typename pass_type >
+template< typename func_t >
+Expression * PassVisitor< pass_type >::handleExpression( Expression * expr, func_t func ) {
+	if( !expr ) return nullptr;
 
 	auto env_ptr = get_env_ptr();
@@ -138,20 +202,23 @@
 		*env_ptr = expr->get_env();
 	}
-	// xxx - should env be cloned (or moved) onto the result of the mutate?
-	expr->accept( *this );
+
+	// should env be cloned (or moved) onto the result of the mutate?
+	return func( expr );
+}
+
+template< typename pass_type >
+Expression * PassVisitor< pass_type >::visitExpression( Expression * expr ) {
+	return handleExpression(expr, [this]( Expression * expr ) {
+		expr->accept( *this );
+		return expr;
+	});		
 }
 
 template< typename pass_type >
 Expression * PassVisitor< pass_type >::mutateExpression( Expression * expr ) {
-	if( !expr ) return nullptr;
-
-	auto env_ptr = get_env_ptr();
-	if ( env_ptr && expr->get_env() ) {
-		*env_ptr = expr->get_env();
-	}
-	// xxx - should env be cloned (or moved) onto the result of the mutate?
-	return expr->acceptMutator( *this );
-}
-
+	return handleExpression(expr, [this]( Expression * expr ) {
+		return expr->acceptMutator( *this );
+	});
+}
 
 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -159,45 +226,45 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ObjectDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( FunctionDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( StructDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UnionDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( EnumDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TraitDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TypeDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TypedefDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AsmDecl * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
@@ -231,9 +298,7 @@
 void PassVisitor< pass_type >::visit( ExprStmt * node ) {
 	VISIT_START( node );
-	call_beginScope();
 
 	visitExpression( node->get_expr() );
 
-	call_endScope();
 	VISIT_END( node );
 }
@@ -248,7 +313,14 @@
 }
 
+//--------------------------------------------------------------------------
+// AsmStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AsmStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
+}
+
+template< typename pass_type >
+Statement * PassVisitor< pass_type >::mutate( AsmStmt * node ) {
+	MUTATE_BODY( Statement, node );
 }
 
@@ -257,5 +329,5 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( IfStmt * node ) {
-	VISIT_START( node ); 
+	VISIT_START( node );
 
 	visitExpression( node->get_condition() );
@@ -268,5 +340,5 @@
 template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( IfStmt * node ) {
-	MUTATE_START( node ); 
+	MUTATE_START( node );
 
 	node->set_condition( mutateExpression( node->get_condition() ) );
@@ -281,5 +353,5 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( WhileStmt * node ) {
-	VISIT_START( node ); 
+	VISIT_START( node );
 
 	visitExpression( node->get_condition() );
@@ -291,5 +363,5 @@
 template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( WhileStmt * node ) {
-	MUTATE_START( node ); 
+	MUTATE_START( node );
 
 	node->set_condition( mutateExpression( node->get_condition() ) );
@@ -300,8 +372,8 @@
 
 //--------------------------------------------------------------------------
-// WhileStmt
+// ForStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ForStmt * node ) {
-	VISIT_START( node ); 
+	VISIT_START( node );
 
 	acceptAll( node->get_initialization(), *this );
@@ -315,5 +387,5 @@
 template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( ForStmt * node ) {
-	MUTATE_START( node ); 
+	MUTATE_START( node );
 
 	mutateAll( node->get_initialization(), *this );
@@ -329,5 +401,5 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( SwitchStmt * node ) {
-	VISIT_START( node ); 
+	VISIT_START( node );
 
 	visitExpression( node->get_condition() );
@@ -339,21 +411,21 @@
 template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( SwitchStmt * node ) {
-	MUTATE_START( node ); 
-	
+	MUTATE_START( node );
+
 	node->set_condition( mutateExpression( node->get_condition() ) );
 	mutateStatementList( node->get_statements() );
-	
+
 	MUTATE_END( Statement, node );
 }
 
 //--------------------------------------------------------------------------
-// SwitchStmt
+// CaseStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( CaseStmt * node ) {
-	VISIT_START( node ); 
-	
+	VISIT_START( node );
+
 	visitExpression( node->get_condition() );
 	visitStatementList( node->get_statements() );
-	
+
 	VISIT_END( node );
 }
@@ -361,15 +433,22 @@
 template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( CaseStmt * node ) {
-	MUTATE_START( node ); 
-	
+	MUTATE_START( node );
+
 	node->set_condition(  mutateExpression( node->get_condition() ) );
 	mutateStatementList( node->get_statements() );
-	
+
 	MUTATE_END( Statement, node );
 }
 
+//--------------------------------------------------------------------------
+// BranchStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( BranchStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
+}
+
+template< typename pass_type >
+Statement * PassVisitor< pass_type >::mutate( BranchStmt * node ) {
+	MUTATE_BODY( Statement, node );
 }
 
@@ -415,4 +494,5 @@
 	maybeAccept( node->get_block(), *this );
 	acceptAll( node->get_catchers(), *this );
+	maybeAccept( node->get_finally(), *this );
 
 	VISIT_END( node );
@@ -425,5 +505,6 @@
 	node->set_block(  maybeMutate( node->get_block(), *this ) );
 	mutateAll( node->get_catchers(), *this );
-	
+	node->set_finally( maybeMutate( node->get_finally(), *this ) );
+
 	MUTATE_END( Statement, node );
 }
@@ -435,6 +516,7 @@
 	VISIT_START( node );
 
+	maybeAccept( node->get_decl(), *this );
+	node->set_cond( visitExpression( node->get_cond() ) );
 	node->set_body( visitStatement( node->get_body() ) );
-	maybeAccept( node->get_decl(), *this );
 
 	VISIT_END( node );
@@ -444,8 +526,9 @@
 Statement * PassVisitor< pass_type >::mutate( CatchStmt * node ) {
 	MUTATE_START( node );
-	
-	node->set_body(  mutateStatement( node->get_body() ) );
-	node->set_decl(  maybeMutate( node->get_decl(), *this ) );
-	
+
+	node->set_decl( maybeMutate( node->get_decl(), *this ) );
+	node->set_cond( mutateExpression( node->get_cond() ) );
+	node->set_body( mutateStatement( node->get_body() ) );
+
 	MUTATE_END( Statement, node );
 }
@@ -453,25 +536,25 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( FinallyStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( NullStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( DeclStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ImplicitCtorDtorStmt * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ApplicationExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
@@ -502,140 +585,135 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( NameExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( CastExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AddressExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( LabelAddressExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UntypedMemberExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( MemberExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( VariableExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ConstantExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( SizeofExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AlignofExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UntypedOffsetofExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( OffsetofExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( OffsetPackExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AttrExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( LogicalExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ConditionalExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( CommaExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TypeExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AsmExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ImplicitCopyCtorExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ConstructorExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( CompoundLiteralExpr * node ) {
-	VISIT_BODY( node ); 
-}
-
-template< typename pass_type >
-void PassVisitor< pass_type >::visit( UntypedValofExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( RangeExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UntypedTupleExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TupleExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TupleIndexExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TupleAssignExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
@@ -659,5 +737,5 @@
 Expression * PassVisitor< pass_type >::mutate( StmtExpr * node ) {
 	MUTATE_START( node );
-	
+
 	// don't want statements from outer CompoundStmts to be added to this StmtExpr
 	ValueGuardPtr< TypeSubstitution * >      oldEnv        ( get_env_ptr() );
@@ -672,85 +750,85 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UniqueExpr * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( VoidType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( BasicType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( PointerType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ArrayType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( FunctionType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( StructInstType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( UnionInstType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( EnumInstType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TraitInstType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TypeInstType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TupleType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( TypeofType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AttrType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( VarArgsType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ZeroType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( OneType * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
@@ -777,20 +855,20 @@
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ListInit * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ConstructorInit * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( Subrange * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( Constant * node ) {
-	VISIT_BODY( node ); 
+	VISIT_BODY( node );
 }
 
@@ -843,14 +921,4 @@
 
 template< typename pass_type >
-Statement * PassVisitor< pass_type >::mutate( AsmStmt * node ) {
-	MUTATE_BODY( Statement, node );
-}
-
-template< typename pass_type >
-Statement * PassVisitor< pass_type >::mutate( BranchStmt * node ) {
-	MUTATE_BODY( Statement, node );
-}
-
-template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( FinallyStmt * node ) {
 	MUTATE_BODY( Statement, node );
@@ -988,9 +1056,4 @@
 
 template< typename pass_type >
-Expression * PassVisitor< pass_type >::mutate( UntypedValofExpr * node ) {
-	MUTATE_BODY( Expression, node );
-}
-
-template< typename pass_type >
 Expression * PassVisitor< pass_type >::mutate( RangeExpr * node ) {
 	MUTATE_BODY( Expression, node );
Index: src/Common/PassVisitor.proto.h
===================================================================
--- src/Common/PassVisitor.proto.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Common/PassVisitor.proto.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -1,3 +1,6 @@
 #pragma once
+
+template<typename pass_type>
+class PassVisitor;
 
 typedef std::function<void( void * )> cleanup_func_t;
@@ -31,4 +34,22 @@
 
 typedef std::function< void( cleanup_func_t, void * ) > at_cleanup_t;
+
+class bool_ref {
+public:
+	bool_ref() = default;
+	~bool_ref() = default;
+
+	operator bool() { return *m_ref; }
+	bool operator=( bool val ) { return *m_ref = val; }
+
+private:
+
+	template<typename pass>
+	friend class PassVisitor;
+
+	void set( bool & val ) { m_ref = &val; };
+
+	bool * m_ref;
+};
 
 //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -112,4 +133,7 @@
 FIELD_PTR( std::list< Statement* >, stmtsToAddBefore )
 FIELD_PTR( std::list< Statement* >, stmtsToAddAfter  )
-FIELD_PTR( bool, skip_children )
+FIELD_PTR( std::list< Declaration* >, declsToAddBefore )
+FIELD_PTR( std::list< Declaration* >, declsToAddAfter  )
+FIELD_PTR( bool_ref, visit_children )
 FIELD_PTR( at_cleanup_t, at_cleanup )
+FIELD_PTR( PassVisitor<pass_type> * const, visitor )
Index: src/ControlStruct/ExceptTranslate.cc
===================================================================
--- src/ControlStruct/ExceptTranslate.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
+++ src/ControlStruct/ExceptTranslate.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -0,0 +1,485 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ExceptVisitor.cc --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Jun 14 16:49:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 15:57:00 2017
+// Update Count     : 0
+//
+
+#include "ExceptTranslate.h"
+#include "Common/PassVisitor.h"
+
+namespace ControlFlow {
+
+	// This (large) section could probably be moved out of the class
+	// and be static helpers instead.
+
+	// Type(Qualifiers &, false, std::list<Attribute *> &)
+
+	// void (*function)()
+	static FunctionType void_func_t(Type::Qualifiers(), false);
+	// void (*function)(int, exception);
+	static FunctionType catch_func_t(Type::Qualifiers(), false);
+	// int (*function)(exception);
+	static FunctionType match_func_t(Type::Qualifiers(), false);
+	// bool (*function)(exception);
+	static FunctionType handle_func_t(Type::Qualifiers(), false);
+
+	static void init_func_types() {
+		static init_complete = false;
+		if (init_complete) {
+			return;
+		}
+		ObjectDecl index_obj(
+			"index_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::UnsignedInt),
+			/*init*/ NULL
+		);
+		ObjectDecl exception_obj(
+			"exception_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::UnsignedInt),
+			/*init*/ NULL
+		);
+		ObjectDecl bool_obj(
+			"bool_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::Bool),
+			/*init*/ NULL
+		);
+
+		catch_func_t.get_parameters().push_back(index_obj.clone());
+		catch_func_t.get_parameters().push_back(exception_obj.clone());
+		match_func_t.get_returnVals().push_back(index_obj.clone());
+		match_func_t.get_parameters().push_back(exception_obj.clone());
+		handle_func_t.get_returnVals().push_back(bool_obj.clone());
+		handle_func_t.get_parameters().push_back(exception_obj.clone());
+
+		init_complete = true;
+	}
+
+	// Buricratic Helpers (Not having to do with the paritular operation.)
+
+	typedef std::list<CatchStmt*> CatchList;
+
+	void split( CatchList& allHandlers, CatchList& terHandlers,
+	            CatchList& resHandlers ) {
+		while ( !allHandlers.empty() ) {
+			Statement * stmt = allHandlers.front();
+			allHandlers.pop_front();
+			if (CaseStmt::Terminate == stmt->get_kind()) {
+				terHandlers.push_back(stmt);
+			} else {
+				resHandlers.push_back(stmt);
+			}
+		}
+	}
+
+	template<typename T>
+	void free_all( std::list<T *> &list ) {
+		std::list<T *>::iterator it;
+		for ( it = list.begin() ; it != list.end() ; ++it ) {
+			delete *it;
+		}
+		list.clear();
+	}
+
+	void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
+		block->push_back(new DeclStmt(no_labels, item));
+	}
+
+	Expression * nameOf( FunctionDecl * function ) {
+		return new VariableExpr( function );
+	}
+
+	// ThrowStmt Mutation Helpers
+
+	Statement * create_terminate_throw( ThrowStmt *throwStmt ) {
+		// __throw_terminate( EXPR );
+		ApplicationExpr * call = new ApplicationExpr( /* ... */ );
+		call->get_args.push_back( throwStmt->get_expr() );
+		Statement * result = new ExprStmt( throwStmt->get_labels(), call );
+		throwStmt->set_expr( nullptr );
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_terminate_rethrow( ThrowStmt *throwStmt ) {
+		// __rethrow_terminate();
+		Statement * result = new ExprStmt(
+			throwStmt->get_labels(),
+			new ApplicationExpr( /* ... */ );
+			);
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_resume_throw( ThrowStmt *throwStmt ) {
+		// __throw_resume( EXPR );
+		ApplicationExpr * call = new ApplicationExpr( /* ... */ );
+		call->get_args.push_back( throwStmt->get_expr() );
+		Statement * result = new ExprStmt( throwStmt->get_labels(), call );
+		throwStmt->set_expr( nullptr );
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_resume_rethrow( ThrowStmt *throwStmt ) {
+		// return false;
+		Statement * result = new ReturnStmt(
+			throwStmt->get_labels(),
+			new ConstantExpr(
+				Constant(
+					new BasicType(
+						Type::Qualifiers(),
+						BasicType::Bool
+						),
+					"0")
+				)
+			);
+		delete throwStmt;
+		return result;
+	}
+
+	// TryStmt Mutation Helpers
+
+	CompoundStmt * take_try_block( TryStmt *tryStmt ) {
+		CompoundStmt * block = tryStmt->get_block();
+		tryStmt->set_block( nullptr );
+		return block;
+	}
+	FunctionDecl * create_try_wrapper( TryStmt *tryStmt ) {
+		CompoundStmt * body = base_try->get_block();
+		base_try->set_block(nullptr);
+
+		return new FunctionDecl("try", Type::StorageClasses(),
+			LinkageSpec::Cforall, void_func_t, body);
+	}
+
+	FunctionDecl * create_terminate_catch( CatchList &handlers ) {
+		std::list<CaseStmt *> handler_wrappers;
+
+		// Index 1..{number of handlers}
+		int index = 0;
+		CatchList::iterator it = handlers.begin();
+		for ( ; it != handlers.end() ; ++it ) {
+			++index;
+			CatchStmt * handler = *it;
+
+			std::list<Statement *> core;
+			if ( /*the exception is named*/ ) {
+				ObjectDecl * local_except = /* Dynamic case, same */;
+				core->push_back( new DeclStmt( noLabel, local_except ) );
+			}
+			// Append the provided statement to the handler.
+			core->push_back( cur_handler->get_body() );
+			// Append return onto the inner block? case stmt list?
+			CaseStmt * wrapper = new CaseStmt(
+				noLabels,
+				new ConstantExpr( Constant::from_int( index ) ),
+				core
+				);
+			handler_wrappers.push_back(wrapper);
+		}
+		// TODO: Some sort of meaningful error on default perhaps?
+
+		SwitchStmt * handler_lookup = new SwitchStmt(
+			noLabels,
+			/*parameter 0: index*/,
+			handler_wrappers,
+			false
+			);
+		CompoundStmt * body = new CompoundStmt( noLabels );
+		body->push_back( handler_lookup );
+
+		return new FunctionDecl("catch", Type::StorageClasses(),
+			LinkageSpec::Cforall, catch_func_t, body);
+	}
+
+	// Create a single check from a moddified handler.
+	CompoundStmt *create_single_matcher( CatchStmt * modded_handler ) {
+		CompoundStmt * block = new CompoundStmt( noLables );
+
+		appendDeclStmt( block, modded_handler->get_decl() );
+
+		// TODO: This is not the actual check.
+		LogicalExpr * cond = new ConstantExpr( Constant::from_bool( false ) );
+
+		if ( modded_handler->get_cond() ) {
+			cond = new LogicalExpr( cond, modded_handler->get_cond() )q
+		}
+		block->push_back( new IfStmt( noLabels,
+			cond, modded_handler->get_body() );
+
+		modded_handler->set_decl( nullptr );
+		modded_handler->set_cond( nullptr );
+		modded_handler->set_body( nullptr );
+		delete modded_handler;
+		return block;
+	}
+
+	FunctionDecl * create_terminate_match( CatchList &handlers ) {
+		CompoundStmt * body = new CompoundStmt( noLabels );
+
+		// Index 1..{number of handlers}
+		int index = 0;
+		CatchList::iterator it;
+		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
+			++index;
+			CatchStmt * handler = *it;
+
+			// body should have been taken by create_terminate_catch.
+			// assert( nullptr == handler->get_body() );
+			handler->set_body( new ReturnStmt( noLabels,
+				new ConstantExpr( Constant::from_int( index ) ) ) );
+
+			body->push_back( create_single_matcher( handler ) );
+		}
+
+		return new FunctionDecl("match", Type::StorageClasses(),
+			LinkageSpec::Cforall, match_func_t, body);
+	}
+
+	Statement * create_terminate_caller(
+			FunctionDecl * try_wrapper,
+			FunctionDecl * terminate_catch,
+			FunctionDecl * terminate_match) {
+
+		ApplicationExpr * caller = new ApplicationExpr( /* ... */ );
+		std::list<Expression *>& args = caller.get_args();
+		args.push_back( nameOf( try_wrapper ) );
+		args.push_back( nameOf( terminate_catch ) );
+		args.push_back( nameOf( terminate_match ) );
+
+		return new ExprStmt( noLabels, caller );
+	}
+
+	FunctionDecl * create_resume_handler( CatchList &handlers ) {
+		CompoundStmt * body = new CompountStmt( noLabels );
+
+		CatchList::iterator it;
+		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
+			CatchStmt * handler = *it;
+
+			// Modifiy body.
+			CompoundStmt * handling_code =
+				dynamic_cast<CompoundStmt*>( handler->get_body() );
+			if ( ! handling_code ) {
+				handling_code = new CompoundStmt( noLabels );
+				handling_code->push_back( handler->get_body() );
+			}
+			handling_code->push_back( new ReturnStmt( noLabel,
+				new ConstantExpr( Constant::from_bool( false ) ) ) );
+			handler->set_body( handling_code );
+
+			// Create the handler.
+			body->push_back( create_single_matcher( handler ) );
+		}
+
+		return new FunctionDecl("handle", Type::StorageClasses(),
+			LinkageSpec::Cforall, handle_func_t, body);
+	}
+
+	Statement * create_resume_wrapper(
+			Statement * wraps,
+			FunctionDecl * resume_handler ) {
+		CompoundStmt * body = new CompoundStmt( noLabels );
+
+		// struct node = {current top resume handler, call to resume_handler};
+		// __attribute__((cleanup( ... )));
+		// set top resume handler to node.
+		// The wrapped statement.
+
+		ListInit * node_init;
+		{
+			std::list<Initializer*> field_inits;
+			field_inits.push_back( new SingleInit( /* ... */ ) );
+			field_inits.push_back( new SingleInit( nameOf( resume_handler ) ) );
+			node_init = new ListInit( field_inits );
+		}
+
+		std::list< Attribute * > attributes;
+		{
+			std::list< Expression * > attr_params;
+			attr_params.push_back( nameOf( /* ... deconstructor ... */ ) );
+			attrributes.push_back( new Attribute( "cleanup", attr_params ) );
+		}
+
+		appendDeclStmt( body,
+		/**/ ObjectDecl(
+			"resume_node",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			nullptr,
+			/* Type* = resume_node */,
+			node_init,
+			attributes
+			)
+		);
+		body->push_back( wraps );
+		return body;
+	}
+
+	FunctionDecl * create_finally_wrapper( TryStmt * tryStmt ) {
+		CompoundStmt * body = tryStmt->get_finally();
+		tryStmt->set_finally( nullptr );
+
+		return new FunctionDecl("finally", Type::StorageClasses(),
+			LinkageSpec::Cforall, void_func_t, body);
+	}
+
+	ObjectDecl * create_finally_hook( FunctionDecl * finally_wrapper ) {
+		// struct _cleanup_hook NAME __attribute__((cleanup( ... )));
+
+		// Make Cleanup Attribute.
+		std::list< Attribute * > attributes;
+		{
+			std::list< Expression * > attr_params;
+			attr_params.push_back( nameOf( finally_wrapper ) );
+			attrributes.push_back( new Attribute( "cleanup", attr_params ) );
+		}
+
+		return ObjectDecl( /* ... */
+			const std::string &name "finally_hook",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			nullptr,
+			/* ... Type * ... */,
+			nullptr,
+			attributes
+			);
+	}
+
+
+	class ExceptionMutatorCore : public WithScoping {
+		enum Context { NoHandler, TerHandler, ResHandler };
+
+		// Also need to handle goto, break & continue.
+		// They need to be cut off in a ResHandler, until we enter another
+		// loop, switch or the goto stays within the function.
+
+		Context curContext;
+
+		// We might not need this, but a unique base for each try block's
+		// generated functions might be nice.
+		//std::string curFunctionName;
+		//unsigned int try_count = 0;
+
+
+	public:
+		ExceptionMutatorCore() :
+			curContext(NoHandler)
+		{}
+
+		void premutate( CatchStmt *tryStmt );
+		Statement * postmutate( ThrowStmt *throwStmt );
+		Statement * postmutate( TryStmt *tryStmt );
+	};
+
+	Statement * ExceptionMutatorCore::postmutate( ThrowStmt *throwStmt ) {
+		// Ignoring throwStmt->get_target() for now.
+		if ( ThrowStmt::Terminate == throwStmt->get_kind() ) {
+			if ( throwStmt->get_expr() ) {
+				return create_terminate_throw( throwStmt );
+			} else if ( TerHandler == curContext ) {
+				return create_terminate_rethrow( throwStmt );
+			} else {
+				assertf(false, "Invalid throw in %s at %i\n",
+					throwStmt->location.filename,
+					throwStmt->location.linenumber);
+				return nullptr;
+			}
+		} else {
+			if ( throwStmt->get_expr() ) {
+				return create_resume_throw( throwStmt );
+			} else if ( ResHandler == curContext ) {
+				return create_resume_rethrow( throwStmt );
+			} else {
+				assertf(false, "Invalid throwResume in %s at %i\n",
+					throwStmt->location.filename,
+					throwStmt->location.linenumber);
+				return nullptr;
+			}
+		}
+	}
+
+	Statement * ExceptionMutatorCore::postmutate( TryStmt *tryStmt ) {
+		// Generate a prefix for the function names?
+
+		CompoundStmt * block = new CompoundStmt();
+		Statement * inner = take_try_block( tryStmt );
+
+		if ( tryStmt->get_finally() ) {
+			// Define the helper function.
+			FunctionDecl * finally_block =
+				create_finally_wrapper( tryStmt );
+			appendDeclStmt( block, finally_block );
+			// Create and add the finally cleanup hook.
+			appendDeclStmt( block, create_finally_hook( finally_block ) );
+		}
+
+		StatementList termination_handlers;
+		StatementList resumption_handlers;
+		split( tryStmt->get_handlers(),
+		       termination_handlers, resumption_handlers );
+
+		if ( resumeption_handlers.size() ) {
+			// Define the helper function.
+			FunctionDecl * resume_handler =
+				create_resume_handler( resumption_handlers );
+			appendDeclStmt( block, resume_handler );
+			// Prepare hooks
+			inner = create_resume_wrapper( inner, resume_handler );
+		}
+
+		if ( termination_handlers.size() ) {
+			// Define the three helper functions.
+			FunctionDecl * try_wrapper = create_try_wrapper( inner );
+			appendDeclStmt( block, try_wrapper );
+			FunctionDecl * terminate_catch =
+				create_terminate_catch( termination_handlers );
+			appendDeclStmt( block, terminate_catch );
+			FunctionDecl * terminate_match =
+				create_terminate_match( termination_handlers );
+			appendDeclStmt( block, terminate_match );
+			// Build the call to the try wrapper.
+			inner = create_terminate_caller(
+				try_wrapper, terminate_catch, terminate_match );
+		}
+
+		// Embed the try block.
+		block->push_back( inner );
+
+		free_all( termination_handlers );
+		free_all( resumption_handlers );
+
+		return block;
+	}
+
+	void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
+		GuardValue( curContext );
+		if ( CatchStmt::Termination == catchStmt->get_kind() ) {
+			curContext = TerHandler;
+		} else {
+			curContext = ResHandler;
+		}
+	}
+
+    void translateEHM( std::list< Declaration *> & translationUnit ) {
+		PassVisitor<ExceptionMutatorCore> translator;
+		for ( Declaration * decl : translationUnit ) {
+			decl->mutate( translator );
+		}
+	}
+}
Index: src/ControlStruct/ExceptTranslate.h
===================================================================
--- src/ControlStruct/ExceptTranslate.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
+++ src/ControlStruct/ExceptTranslate.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -0,0 +1,27 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ExceptTranslate.h --
+//
+// Author           : Andrew Beach
+// Created On       : Tus Jun 06 10:13:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 15:57:00 2017
+// Update Count     : 0
+//
+
+#ifndef EXCEPT_TRANSLATE_H
+#define EXCEPT_TRANSLATE_H
+
+namespace ControlFlow {
+	void translateEHM( std::list< Declaration *> & translationUnit );
+	/* Converts exception handling structures into their underlying C code.
+	 * Translation does use the exception handling header, make sure it is
+	 * visible wherever translation occurs.
+	 */
+}
+
+#endif // EXCEPT_TRANSLATE_H
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/Box.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat May 13 09:26:38 2017
-// Update Count     : 341
+// Last Modified On : Wed Jun 21 15:49:59 2017
+// Update Count     : 346
 //
 
@@ -62,6 +62,4 @@
 namespace GenPoly {
 	namespace {
-		const std::list<Label> noLabels;
-
 		FunctionType *makeAdapterType( FunctionType *adaptee, const TyVarMap &tyVars );
 
@@ -343,5 +341,5 @@
 	Statement *makeAlignTo( Expression *lhs, Expression *rhs ) {
 		// check that the lhs is zeroed out to the level of rhs
-		Expression *ifCond = makeOp( "?&?", lhs, makeOp( "?-?", rhs, new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), "1" ) ) ) );
+		Expression *ifCond = makeOp( "?&?", lhs, makeOp( "?-?", rhs, new ConstantExpr( Constant::from_ulong( 1 ) ) ) );
 		// if not aligned, increment to alignment
 		Expression *ifExpr = makeOp( "?+=?", lhs->clone(), makeOp( "?-?", rhs->clone(), ifCond->clone() ) );
@@ -386,6 +384,6 @@
 
 		// initialize size and alignment to 0 and 1 (will have at least one member to re-edit size)
-		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( sizeParam ), new ConstantExpr( Constant( sizeAlignType->clone(), "0" ) ) ) );
-		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( alignParam ), new ConstantExpr( Constant( sizeAlignType->clone(), "1" ) ) ) );
+		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( sizeParam ), new ConstantExpr( Constant::from_ulong( 0 ) ) ) );
+		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( alignParam ), new ConstantExpr( Constant::from_ulong( 1 ) ) ) );
 		unsigned long n_members = 0;
 		bool firstMember = true;
@@ -443,6 +441,6 @@
 
 		// calculate union layout in function body
-		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( sizeParam ), new ConstantExpr( Constant( sizeAlignType->clone(), "1" ) ) ) );
-		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( alignParam ), new ConstantExpr( Constant( sizeAlignType->clone(), "1" ) ) ) );
+		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( sizeParam ), new ConstantExpr( Constant::from_ulong( 1 ) ) ) );
+		addExpr( layoutDecl->get_statements(), makeOp( "?=?", derefVar( alignParam ), new ConstantExpr( Constant::from_ulong( 1 ) ) ) );
 		for ( std::list< Declaration* >::const_iterator member = unionDecl->get_members().begin(); member != unionDecl->get_members().end(); ++member ) {
 			DeclarationWithType *dwt = dynamic_cast< DeclarationWithType * >( *member );
@@ -1566,7 +1564,5 @@
 		/// Returns an index expression into the offset array for a type
 		Expression *makeOffsetIndex( Type *objectType, long i ) {
-			std::stringstream offset_namer;
-			offset_namer << i;
-			ConstantExpr *fieldIndex = new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), offset_namer.str() ) );
+			ConstantExpr *fieldIndex = new ConstantExpr( Constant::from_ulong( i ) );
 			UntypedExpr *fieldOffset = new UntypedExpr( new NameExpr( "?[?]" ) );
 			fieldOffset->get_args().push_back( new NameExpr( offsetofName( mangleType( objectType ) ) ) );
@@ -1781,5 +1777,5 @@
 				// all union members are at offset zero
 				delete offsetofExpr;
-				return new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), "0" ) );
+				return new ConstantExpr( Constant::from_ulong( 0 ) );
 			} else return offsetofExpr;
 		}
Index: src/GenPoly/CopyParams.cc
===================================================================
--- src/GenPoly/CopyParams.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/CopyParams.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -45,6 +45,4 @@
 
 	CopyParams::CopyParams() : namer( "_cp" ) {}
-
-	static const std::list< Label > noLabels;
 
 	void CopyParams::visit( FunctionDecl *funcDecl ) {
Index: src/GenPoly/DeclMutator.cc
===================================================================
--- src/GenPoly/DeclMutator.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/DeclMutator.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -9,7 +9,7 @@
 // Author           : Aaron B. Moss
 // Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  4 11:16:43 2016
-// Update Count     : 3
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Jun 22 13:49:00 2017
+// Update Count     : 4
 //
 
@@ -20,12 +20,8 @@
 
 namespace GenPoly {
-	namespace {
-		const std::list<Label> noLabels;
-	}
-
 	DeclMutator::DeclMutator() : Mutator(), declsToAdd(1), declsToAddAfter(1) {}
 
 	DeclMutator::~DeclMutator() {}
-	
+
 	void DeclMutator::mutateDeclarationList( std::list< Declaration* > &decls ) {
 		for ( std::list< Declaration* >::iterator decl = decls.begin(); ; ++decl ) {
@@ -34,5 +30,5 @@
 
 			if ( decl == decls.end() ) break;
-			
+
 			// run mutator on declaration
 			*decl = maybeMutate( *decl, *this );
@@ -55,5 +51,5 @@
 		newBack->splice( newBack->end(), *back );
 		declsToAdd.pop_back();
-		
+
 		back = declsToAddAfter.rbegin();
 		newBack = back + 1;
@@ -66,7 +62,7 @@
 		CompoundStmt *compoundStmt = dynamic_cast< CompoundStmt* >(stmt);
 		if ( compoundStmt ) return mutate( compoundStmt );
-		
+
 		doBeginScope();
-		
+
 		// run mutator on statement
 		stmt = maybeMutate( stmt, *this );
@@ -102,5 +98,5 @@
 		doBeginScope();
 
-		
+
 		for ( std::list< Statement* >::iterator stmt = stmts.begin(); ; ++stmt ) {
 			// add any new declarations after the previous statement
@@ -112,5 +108,5 @@
 
 			if ( stmt == stmts.end() ) break;
-			
+
 			// run mutator on statement
 			*stmt = maybeMutate( *stmt, *this );
@@ -123,5 +119,5 @@
 			declsToAdd.back().clear();
 		}
-		
+
 		doEndScope();
 	}
@@ -139,5 +135,5 @@
 		return compoundStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(IfStmt *ifStmt) {
 		ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
@@ -146,5 +142,5 @@
 		return ifStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(WhileStmt *whileStmt) {
 		whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
@@ -152,5 +148,5 @@
 		return whileStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(ForStmt *forStmt) {
 		mutateAll( forStmt->get_initialization(), *this );
@@ -160,5 +156,5 @@
 		return forStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(SwitchStmt *switchStmt) {
 		switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
@@ -166,5 +162,5 @@
 		return switchStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(CaseStmt *caseStmt) {
 		caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
@@ -172,5 +168,5 @@
 		return caseStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(TryStmt *tryStmt) {
 		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
@@ -179,7 +175,8 @@
 		return tryStmt;
 	}
-	
+
 	Statement* DeclMutator::mutate(CatchStmt *catchStmt) {
 		catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
+		catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
 		catchStmt->set_body( mutateStatement( catchStmt->get_body() ) );
 		return catchStmt;
Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/Lvalue.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -35,6 +35,4 @@
 namespace GenPoly {
 	namespace {
-		const std::list<Label> noLabels;
-
 		/// Replace uses of lvalue returns with appropriate pointers
 		class Pass1 : public Mutator {
Index: src/GenPoly/PolyMutator.cc
===================================================================
--- src/GenPoly/PolyMutator.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/PolyMutator.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  4 11:26:22 2016
-// Update Count     : 16
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Jun 22 13:47:00 2017
+// Update Count     : 17
 //
 
@@ -123,12 +123,14 @@
 
 	Statement * PolyMutator::mutate(TryStmt *tryStmt) {
-		tryStmt->set_block(  maybeMutate( tryStmt->get_block(), *this ) );
+		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
 		mutateAll( tryStmt->get_catchers(), *this );
+		tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
 		return tryStmt;
 	}
 
 	Statement * PolyMutator::mutate(CatchStmt *cathStmt) {
-		cathStmt->set_body(  mutateStatement( cathStmt->get_body() ) );
-		cathStmt->set_decl(  maybeMutate( cathStmt->get_decl(), *this ) );
+		cathStmt->set_body( mutateStatement( cathStmt->get_body() ) );
+		cathStmt->set_cond( maybeMutate( cathStmt->get_cond(), *this ) );
+		cathStmt->set_decl( maybeMutate( cathStmt->get_decl(), *this ) );
 		return cathStmt;
 	}
Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/GenPoly/Specialize.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -99,4 +99,6 @@
 		if ( FunctionType * fftype = getFunctionType( formalType ) ) {
 			if ( fftype->isTtype() ) return true;
+			// conversion of 0 (null) to function type does not require tuple specialization
+			if ( dynamic_cast< ZeroType * >( actualType ) ) return false;
 			FunctionType * aftype = getFunctionType( actualType );
 			assertf( aftype, "formal type is a function type, but actual type is not." );
Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/InitTweak/FixGlobalInit.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -26,8 +26,4 @@
 
 namespace InitTweak {
-	namespace {
-		const std::list<Label> noLabels;
-	}
-
 	class GlobalFixer : public Visitor {
 	  public:
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/InitTweak/FixInit.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Wed Jan 13 16:29:30 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 17 09:13:47 2017
-// Update Count     : 71
+// Last Modified On : Wed Jun 21 17:35:05 2017
+// Update Count     : 74
 //
 
@@ -56,5 +56,5 @@
 		typedef std::unordered_map< int, int > UnqCount;
 
-		class InsertImplicitCalls {
+		class InsertImplicitCalls : public WithTypeSubstitution {
 		public:
 			/// wrap function application expressions as ImplicitCopyCtorExpr nodes so that it is easy to identify which
@@ -69,5 +69,4 @@
 			// collects environments for relevant nodes
 			EnvMap & envMap;
-			TypeSubstitution * env; //Magically populated by the PassVisitor
 		};
 
@@ -192,5 +191,5 @@
 		};
 
-		class FixInit {
+		class FixInit : public WithStmtsToAdd {
 		  public:
 			/// expand each object declaration to use its constructor after it is declared.
@@ -200,5 +199,4 @@
 
 			std::list< Declaration * > staticDtorDecls;
-			std::list< Statement * > stmtsToAddAfter; // found by PassVisitor
 		};
 
@@ -726,5 +724,5 @@
 						// static bool __objName_uninitialized = true
 						BasicType * boolType = new BasicType( Type::Qualifiers(), BasicType::Bool );
-						SingleInit * boolInitExpr = new SingleInit( new ConstantExpr( Constant( boolType->clone(), "1" ) ), noDesignators );
+						SingleInit * boolInitExpr = new SingleInit( new ConstantExpr( Constant::from_int( 1 ) ), noDesignators );
 						ObjectDecl * isUninitializedVar = new ObjectDecl( objDecl->get_mangleName() + "_uninitialized", Type::StorageClasses( Type::Static ), LinkageSpec::Cforall, 0, boolType, boolInitExpr );
 						isUninitializedVar->fixUniqueId();
@@ -733,5 +731,5 @@
 						UntypedExpr * setTrue = new UntypedExpr( new NameExpr( "?=?" ) );
 						setTrue->get_args().push_back( new VariableExpr( isUninitializedVar ) );
-						setTrue->get_args().push_back( new ConstantExpr( Constant( boolType->clone(), "0" ) ) );
+						setTrue->get_args().push_back( new ConstantExpr( Constant::from_int( 0 ) ) );
 
 						// generate body of if
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/InitTweak/GenInit.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -21,4 +21,10 @@
 
 #include "Common/PassVisitor.h"
+
+#include "GenPoly/DeclMutator.h"
+#include "GenPoly/PolyMutator.h"
+#include "GenPoly/ScopedSet.h"
+
+#include "ResolvExpr/typeops.h"
 
 #include "SynTree/Declaration.h"
@@ -31,10 +37,4 @@
 #include "SymTab/Autogen.h"
 #include "SymTab/Mangler.h"
-
-#include "GenPoly/DeclMutator.h"
-#include "GenPoly/PolyMutator.h"
-#include "GenPoly/ScopedSet.h"
-
-#include "ResolvExpr/typeops.h"
 
 namespace InitTweak {
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/InitTweak/InitTweak.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -474,4 +474,6 @@
 	public:
 		ConstExprChecker() : isConstExpr( true ) {}
+
+		using Visitor::visit;
 
 		virtual void visit( __attribute((unused)) ApplicationExpr *applicationExpr ) { isConstExpr = false; }
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Parser/ExpressionNode.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:17:07 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed May 17 21:31:01 2017
-// Update Count     : 527
+// Last Modified On : Wed Jun 21 16:44:46 2017
+// Update Count     : 541
 //
 
@@ -62,5 +62,5 @@
 	bool dec = true, Unsigned = false;					// decimal, unsigned constant
 	int size;											// 0 => int, 1 => long, 2 => long long
-	unsigned long long v;								// converted integral value
+	unsigned long long int v;								// converted integral value
 	size_t last = str.length() - 1;						// last character of constant
 
@@ -118,5 +118,5 @@
 	} // if
 
-	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str ) );
+	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str, v ) );
 	delete &str;										// created by lex
 	return ret;
@@ -133,4 +133,7 @@
 	// floating-point constant has minimum of 2 characters: 1. or .1
 	size_t last = str.length() - 1;
+	double v;
+
+	sscanf( str.c_str(), "%lg", &v );
 
 	if ( checkI( str[last] ) ) {						// imaginary ?
@@ -150,5 +153,5 @@
 	} // if
 
-	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str ) );
+	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str, v ) );
 	delete &str;										// created by lex
 	return ret;
@@ -156,5 +159,5 @@
 
 Expression *build_constantChar( const std::string & str ) {
-	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str ) );
+	Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str, (unsigned long long int)(unsigned char)str[1] ) );
 	delete &str;										// created by lex
 	return ret;
@@ -164,8 +167,8 @@
 	// string should probably be a primitive type
 	ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
-				new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::UnsignedInt ),
-											toString( str.size()+1-2 ) ) ),  // +1 for '\0' and -2 for '"'
+								   new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ),  // +1 for '\0' and -2 for '"'
 								   false, false );
-	ConstantExpr * ret = new ConstantExpr( Constant( at, str ) );
+	// constant 0 is ignored for pure string value
+	ConstantExpr * ret = new ConstantExpr( Constant( at, str, (unsigned long long int)0 ) );
 	delete &str;										// created by lex
 	return ret;
@@ -173,5 +176,6 @@
 
 Expression *build_constantZeroOne( const std::string & str ) {
-	Expression * ret = new ConstantExpr( Constant( str == "0" ? (Type *)new ZeroType( emptyQualifiers ) : (Type*)new OneType( emptyQualifiers ), str ) );
+	Expression * ret = new ConstantExpr( Constant( str == "0" ? (Type *)new ZeroType( emptyQualifiers ) : (Type*)new OneType( emptyQualifiers ), str,
+												   str == "0" ? (unsigned long long int)0 : (unsigned long long int)1 ) );
 	delete &str;										// created by lex
 	return ret;
@@ -184,7 +188,5 @@
 	std::stringstream ss( str );
 	ss >> a >> dot >> b;
-	UntypedMemberExpr * ret = new UntypedMemberExpr(
-		new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::SignedInt ), toString( b ) ) ),
-		new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::SignedInt ), toString( a ) ) ) );
+	UntypedMemberExpr * ret = new UntypedMemberExpr( new ConstantExpr( Constant::from_int( b ) ), new ConstantExpr( Constant::from_int( a ) ) );
 	delete &str;
 	return ret;
@@ -346,5 +348,5 @@
 
 Expression *build_valexpr( StatementNode *s ) {
-	return new UntypedValofExpr( maybeMoveBuild< Statement >(s), nullptr );
+	return new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(s) ) );
 }
 Expression *build_typevalue( DeclarationNode *decl ) {
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Parser/ParseNode.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -415,4 +415,6 @@
 				result->location = cur->location;
 				* out++ = result;
+			} else {
+				assertf(false, "buildList unknown type");
 			} // if
 		} catch( SemanticError &e ) {
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Parser/StatementNode.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -168,13 +168,12 @@
 
 Statement *build_resume_at( ExpressionNode *ctl, ExpressionNode *target ) {
-	std::list< Expression * > exps;
-	buildMoveList( ctl, exps );
-	assertf( exps.size() < 2, "This means we are leaking memory");
-	return new ThrowStmt( noLabels, ThrowStmt::Resume, !exps.empty() ? exps.back() : nullptr );
+	(void)ctl;
+	(void)target;
+	assertf( false, "resume at (non-local throw) is not yet supported," );
 }
 
 Statement *build_try( StatementNode *try_stmt, StatementNode *catch_stmt, StatementNode *finally_stmt ) {
-	std::list< Statement * > branches;
-	buildMoveList< Statement, StatementNode >( catch_stmt, branches );
+	std::list< CatchStmt * > branches;
+	buildMoveList< CatchStmt, StatementNode >( catch_stmt, branches );
 	CompoundStmt *tryBlock = safe_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt));
 	FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) );
Index: src/Parser/parseutility.cc
===================================================================
--- src/Parser/parseutility.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Parser/parseutility.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:30:39 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 14 23:45:03 2016
-// Update Count     : 3
+// Last Modified On : Wed Jun 21 15:33:41 2017
+// Update Count     : 5
 //
 
@@ -26,5 +26,5 @@
 	UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) );
 	comparison->get_args().push_back( orig );
-	comparison->get_args().push_back( new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0" ) ) );
+	comparison->get_args().push_back( new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0", (unsigned long long int)0 ) ) );
 	return new CastExpr( comparison, new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
 }
Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SymTab/Autogen.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Sun May 17 21:53:34 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 17 09:10:41 2017
-// Update Count     : 9
+// Last Modified On : Wed Jun 21 17:25:26 2017
+// Update Count     : 14
 //
 
@@ -25,153 +25,153 @@
 
 namespace SymTab {
-	/// Generates assignment operators, constructors, and destructor for aggregate types as required
-	void autogenerateRoutines( std::list< Declaration * > &translationUnit );
+    /// Generates assignment operators, constructors, and destructor for aggregate types as required
+    void autogenerateRoutines( std::list< Declaration * > &translationUnit );
 
-	/// returns true if obj's name is the empty string and it has a bitfield width
-	bool isUnnamedBitfield( ObjectDecl * obj );
+    /// returns true if obj's name is the empty string and it has a bitfield width
+    bool isUnnamedBitfield( ObjectDecl * obj );
 
-	/// size_t type - set when size_t typedef is seen. Useful in a few places,
-	/// such as in determining array dimension type
-	extern Type * SizeType;
+    /// size_t type - set when size_t typedef is seen. Useful in a few places,
+    /// such as in determining array dimension type
+    extern Type * SizeType;
 
-	/// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls.
-	template< typename OutputIterator >
+    /// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls.
+    template< typename OutputIterator >
 	Statement * genCall( InitTweak::InitExpander & srcParam, Expression * dstParam, const std::string & fname, OutputIterator out, Type * type, bool addCast = false, bool forward = true );
 
-	/// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Should only be called with non-array types.
-	/// optionally returns a statement which must be inserted prior to the containing loop, if there is one
-	template< typename OutputIterator >
+    /// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Should only be called with non-array types.
+    /// optionally returns a statement which must be inserted prior to the containing loop, if there is one
+    template< typename OutputIterator >
 	Statement * genScalarCall( InitTweak::InitExpander & srcParam, Expression *dstParam, const std::string & fname, OutputIterator out, Type * type, bool addCast = false ) {
-		// want to be able to generate assignment, ctor, and dtor generically,
-		// so fname is either ?=?, ?{}, or ^?{}
-		UntypedExpr *fExpr = new UntypedExpr( new NameExpr( fname ) );
+	// want to be able to generate assignment, ctor, and dtor generically,
+	// so fname is either ?=?, ?{}, or ^?{}
+	UntypedExpr *fExpr = new UntypedExpr( new NameExpr( fname ) );
 
-		// do something special for unnamed members
-		dstParam = new AddressExpr( dstParam );
-		if ( addCast ) {
-			// cast to T* with qualifiers removed, so that qualified objects can be constructed
-			// and destructed with the same functions as non-qualified objects.
-			// unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
-			// must have an lvalue qualified type, so remove all qualifiers except lvalue. If we ever
-			// remove lvalue as a qualifier, this can change to
-			//   type->get_qualifiers() = Type::Qualifiers();
-			assert( type );
-			Type * castType = type->clone();
+	// do something special for unnamed members
+	dstParam = new AddressExpr( dstParam );
+	if ( addCast ) {
+	    // cast to T* with qualifiers removed, so that qualified objects can be constructed
+	    // and destructed with the same functions as non-qualified objects.
+	    // unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
+	    // must have an lvalue qualified type, so remove all qualifiers except lvalue. If we ever
+	    // remove lvalue as a qualifier, this can change to
+	    //   type->get_qualifiers() = Type::Qualifiers();
+	    assert( type );
+	    Type * castType = type->clone();
 //			castType->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, false);
-			castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
-			castType->set_lvalue( true ); // xxx - might not need this
-			dstParam = new CastExpr( dstParam, new PointerType( Type::Qualifiers(), castType ) );
-		}
-		fExpr->get_args().push_back( dstParam );
+	    castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
+	    castType->set_lvalue( true ); // xxx - might not need this
+	    dstParam = new CastExpr( dstParam, new PointerType( Type::Qualifiers(), castType ) );
+	}
+	fExpr->get_args().push_back( dstParam );
 
-		Statement * listInit = srcParam.buildListInit( fExpr );
+	Statement * listInit = srcParam.buildListInit( fExpr );
 
-		std::list< Expression * > args = *++srcParam;
-		fExpr->get_args().splice( fExpr->get_args().end(), args );
+	std::list< Expression * > args = *++srcParam;
+	fExpr->get_args().splice( fExpr->get_args().end(), args );
 
-		*out++ = new ExprStmt( noLabels, fExpr );
+	*out++ = new ExprStmt( noLabels, fExpr );
 
-		srcParam.clearArrayIndices();
+	srcParam.clearArrayIndices();
 
-		return listInit;
+	return listInit;
+    }
+
+    /// Store in out a loop which calls fname on each element of the array with srcParam and dstParam as arguments.
+    /// If forward is true, loop goes from 0 to N-1, else N-1 to 0
+    template< typename OutputIterator >
+	void genArrayCall( InitTweak::InitExpander & srcParam, Expression *dstParam, const std::string & fname, OutputIterator out, ArrayType *array, bool addCast = false, bool forward = true ) {
+	static UniqueName indexName( "_index" );
+
+	// for a flexible array member nothing is done -- user must define own assignment
+	if ( ! array->get_dimension() ) return ;
+
+	Expression * begin, * end, * update, * cmp;
+	if ( forward ) {
+	    // generate: for ( int i = 0; i < N; ++i )
+	    begin = new ConstantExpr( Constant::from_int( 0 ) );
+	    end = array->get_dimension()->clone();
+	    cmp = new NameExpr( "?<?" );
+	    update = new NameExpr( "++?" );
+	} else {
+	    // generate: for ( int i = N-1; i >= 0; --i )
+	    begin = new UntypedExpr( new NameExpr( "?-?" ) );
+	    ((UntypedExpr*)begin)->get_args().push_back( array->get_dimension()->clone() );
+	    ((UntypedExpr*)begin)->get_args().push_back( new ConstantExpr( Constant::from_int( 1 ) ) );
+	    end = new ConstantExpr( Constant::from_int( 0 ) );
+	    cmp = new NameExpr( "?>=?" );
+	    update = new NameExpr( "--?" );
 	}
 
-	/// Store in out a loop which calls fname on each element of the array with srcParam and dstParam as arguments.
-	/// If forward is true, loop goes from 0 to N-1, else N-1 to 0
-	template< typename OutputIterator >
-	void genArrayCall( InitTweak::InitExpander & srcParam, Expression *dstParam, const std::string & fname, OutputIterator out, ArrayType *array, bool addCast = false, bool forward = true ) {
-		static UniqueName indexName( "_index" );
+	ObjectDecl *index = new ObjectDecl( indexName.newName(), Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), new SingleInit( begin, std::list<Expression*>() ) );
 
-		// for a flexible array member nothing is done -- user must define own assignment
-		if ( ! array->get_dimension() ) return ;
+	UntypedExpr *cond = new UntypedExpr( cmp );
+	cond->get_args().push_back( new VariableExpr( index ) );
+	cond->get_args().push_back( end );
 
-		Expression * begin, * end, * update, * cmp;
-		if ( forward ) {
-			// generate: for ( int i = 0; i < 0; ++i )
-			begin = new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0" ) );
-			end = array->get_dimension()->clone();
-			cmp = new NameExpr( "?<?" );
-			update = new NameExpr( "++?" );
-		} else {
-			// generate: for ( int i = N-1; i >= 0; --i )
-			begin = new UntypedExpr( new NameExpr( "?-?" ) );
-			((UntypedExpr*)begin)->get_args().push_back( array->get_dimension()->clone() );
-			((UntypedExpr*)begin)->get_args().push_back( new ConstantExpr( Constant( new OneType( emptyQualifiers ), "1" ) ) );
-			end = new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0" ) );
-			cmp = new NameExpr( "?>=?" );
-			update = new NameExpr( "--?" );
-		}
+	UntypedExpr *inc = new UntypedExpr( update );
+	inc->get_args().push_back( new AddressExpr( new VariableExpr( index ) ) );
 
-		ObjectDecl *index = new ObjectDecl( indexName.newName(), Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), new SingleInit( begin, std::list<Expression*>() ) );
+	UntypedExpr *dstIndex = new UntypedExpr( new NameExpr( "?[?]" ) );
+	dstIndex->get_args().push_back( dstParam );
+	dstIndex->get_args().push_back( new VariableExpr( index ) );
+	dstParam = dstIndex;
 
-		UntypedExpr *cond = new UntypedExpr( cmp );
-		cond->get_args().push_back( new VariableExpr( index ) );
-		cond->get_args().push_back( end );
+	// srcParam must keep track of the array indices to build the
+	// source parameter and/or array list initializer
+	srcParam.addArrayIndex( new VariableExpr( index ), array->get_dimension()->clone() );
 
-		UntypedExpr *inc = new UntypedExpr( update );
-		inc->get_args().push_back( new AddressExpr( new VariableExpr( index ) ) );
+	// for stmt's body, eventually containing call
+	CompoundStmt * body = new CompoundStmt( noLabels );
+	Statement * listInit = genCall( srcParam, dstParam, fname, back_inserter( body->get_kids() ), array->get_base(), addCast, forward );
 
-		UntypedExpr *dstIndex = new UntypedExpr( new NameExpr( "?[?]" ) );
-		dstIndex->get_args().push_back( dstParam );
-		dstIndex->get_args().push_back( new VariableExpr( index ) );
-		dstParam = dstIndex;
+	// block containing for stmt and index variable
+	std::list<Statement *> initList;
+	CompoundStmt * block = new CompoundStmt( noLabels );
+	block->get_kids().push_back( new DeclStmt( noLabels, index ) );
+	if ( listInit ) block->get_kids().push_back( listInit );
+	block->get_kids().push_back( new ForStmt( noLabels, initList, cond, inc, body ) );
 
-		// srcParam must keep track of the array indices to build the
-		// source parameter and/or array list initializer
-		srcParam.addArrayIndex( new VariableExpr( index ), array->get_dimension()->clone() );
+	*out++ = block;
+    }
 
-		// for stmt's body, eventually containing call
-		CompoundStmt * body = new CompoundStmt( noLabels );
-		Statement * listInit = genCall( srcParam, dstParam, fname, back_inserter( body->get_kids() ), array->get_base(), addCast, forward );
+    template< typename OutputIterator >
+	Statement * genCall( InitTweak::InitExpander &  srcParam, Expression * dstParam, const std::string & fname, OutputIterator out, Type * type, bool addCast, bool forward ) {
+	if ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) {
+	    genArrayCall( srcParam, dstParam, fname, out, at, addCast, forward );
+	    return 0;
+	} else {
+	    return genScalarCall( srcParam, dstParam, fname, out, type, addCast );
+	}
+    }
 
-		// block containing for stmt and index variable
-		std::list<Statement *> initList;
-		CompoundStmt * block = new CompoundStmt( noLabels );
-		block->get_kids().push_back( new DeclStmt( noLabels, index ) );
-		if ( listInit ) block->get_kids().push_back( listInit );
-		block->get_kids().push_back( new ForStmt( noLabels, initList, cond, inc, body ) );
+    /// inserts into out a generated call expression to function fname with arguments dstParam
+    /// and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls. decl is the
+    /// object being constructed. The function wraps constructor and destructor calls in an
+    /// ImplicitCtorDtorStmt node.
+    template< typename OutputIterator >
+	void genImplicitCall( InitTweak::InitExpander &  srcParam, Expression * dstParam, const std::string & fname, OutputIterator out, DeclarationWithType * decl, bool forward = true ) {
+	ObjectDecl *obj = dynamic_cast<ObjectDecl *>( decl );
+	assert( obj );
+	// unnamed bit fields are not copied as they cannot be accessed
+	if ( isUnnamedBitfield( obj ) ) return;
 
-		*out++ = block;
+	bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) );
+	std::list< Statement * > stmts;
+	genCall( srcParam, dstParam, fname, back_inserter( stmts ), obj->get_type(), addCast, forward );
+
+	// currently genCall should produce at most one element, but if that changes then the next line needs to be updated to grab the statement which contains the call
+	assert( stmts.size() <= 1 );
+	if ( stmts.size() == 1 ) {
+	    Statement * callStmt = stmts.front();
+	    if ( addCast ) {
+		// implicitly generated ctor/dtor calls should be wrapped
+		// so that later passes are aware they were generated.
+		// xxx - don't mark as an implicit ctor/dtor if obj is a bitfield,
+		// because this causes the address to be taken at codegen, which is illegal in C.
+		callStmt = new ImplicitCtorDtorStmt( callStmt );
+	    }
+	    *out++ = callStmt;
 	}
-
-	template< typename OutputIterator >
-	Statement * genCall( InitTweak::InitExpander &  srcParam, Expression * dstParam, const std::string & fname, OutputIterator out, Type * type, bool addCast, bool forward ) {
-		if ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) {
-			genArrayCall( srcParam, dstParam, fname, out, at, addCast, forward );
-			return 0;
-		} else {
-			return genScalarCall( srcParam, dstParam, fname, out, type, addCast );
-		}
-	}
-
-	/// inserts into out a generated call expression to function fname with arguments dstParam
-	/// and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls. decl is the
-	/// object being constructed. The function wraps constructor and destructor calls in an
-	/// ImplicitCtorDtorStmt node.
-	template< typename OutputIterator >
-	void genImplicitCall( InitTweak::InitExpander &  srcParam, Expression * dstParam, const std::string & fname, OutputIterator out, DeclarationWithType * decl, bool forward = true ) {
-		ObjectDecl *obj = dynamic_cast<ObjectDecl *>( decl );
-		assert( obj );
-		// unnamed bit fields are not copied as they cannot be accessed
-		if ( isUnnamedBitfield( obj ) ) return;
-
-		bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) );
-		std::list< Statement * > stmts;
-		genCall( srcParam, dstParam, fname, back_inserter( stmts ), obj->get_type(), addCast, forward );
-
-		// currently genCall should produce at most one element, but if that changes then the next line needs to be updated to grab the statement which contains the call
-		assert( stmts.size() <= 1 );
-		if ( stmts.size() == 1 ) {
-			Statement * callStmt = stmts.front();
-			if ( addCast ) {
-				// implicitly generated ctor/dtor calls should be wrapped
-				// so that later passes are aware they were generated.
-				// xxx - don't mark as an implicit ctor/dtor if obj is a bitfield,
-				// because this causes the address to be taken at codegen, which is illegal in C.
-				callStmt = new ImplicitCtorDtorStmt( callStmt );
-			}
-			*out++ = callStmt;
-		}
-	}
+    }
 } // namespace SymTab
 #endif // AUTOGEN_H
Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SymTab/Indexer.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -493,9 +493,4 @@
 		acceptNewScope( compLitExpr->get_result(), *this );
 		maybeAccept( compLitExpr->get_initializer(), *this );
-	}
-
-	void Indexer::visit( UntypedValofExpr *valofExpr ) {
-		acceptNewScope( valofExpr->get_result(), *this );
-		maybeAccept( valofExpr->get_body(), *this );
 	}
 
Index: src/SymTab/Indexer.h
===================================================================
--- src/SymTab/Indexer.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SymTab/Indexer.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -69,5 +69,4 @@
 		virtual void visit( ConstructorExpr * ctorExpr );
 		virtual void visit( CompoundLiteralExpr *compLitExpr );
-		virtual void visit( UntypedValofExpr *valofExpr );
 		virtual void visit( RangeExpr *rangeExpr );
 		virtual void visit( UntypedTupleExpr *tupleExpr );
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SymTab/Validate.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -66,4 +66,5 @@
 #include "ResolvExpr/typeops.h"
 
+#include "SynTree/Attribute.h"
 #include "SynTree/Expression.h"
 #include "SynTree/Mutator.h"
@@ -114,8 +115,8 @@
 
 	/// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers.
-	class EnumAndPointerDecayPass final : public Visitor {
-		typedef Visitor Parent;
-		virtual void visit( EnumDecl *aggregateDecl );
-		virtual void visit( FunctionType *func );
+	class EnumAndPointerDecay {
+	public:
+		void previsit( EnumDecl *aggregateDecl );
+		void previsit( FunctionType *func );
 	};
 
@@ -125,5 +126,4 @@
 	  public:
 		LinkReferenceToTypes( bool doDebug, const Indexer *indexer );
-	  private:
   		using Parent::visit;
 		void visit( EnumInstType *enumInst ) final;
@@ -135,5 +135,5 @@
 		void visit( UnionDecl *unionDecl ) final;
 		void visit( TypeInstType *typeInst ) final;
-
+	  private:
 		const Indexer *indexer;
 
@@ -146,11 +146,11 @@
 	};
 
-	/// Replaces array and function types in forall lists by appropriate pointer type
-	class Pass3 final : public Indexer {
+	/// Replaces array and function types in forall lists by appropriate pointer type and assigns each Object and Function declaration a unique ID.
+	class ForallPointerDecay final : public Indexer {
 		typedef Indexer Parent;
 	  public:
 	  	using Parent::visit;
-		Pass3( const Indexer *indexer );
-	  private:
+		ForallPointerDecay( const Indexer *indexer );
+
 		virtual void visit( ObjectDecl *object ) override;
 		virtual void visit( FunctionDecl *func ) override;
@@ -159,5 +159,5 @@
 	};
 
-	class ReturnChecker {
+	class ReturnChecker : public WithScopes {
 	  public:
 		/// Checks that return statements return nothing if their return type is void
@@ -166,10 +166,8 @@
 	  private:
 		void previsit( FunctionDecl * functionDecl );
-		void postvisit( FunctionDecl * functionDecl );
 		void previsit( ReturnStmt * returnStmt );
 
 		typedef std::list< DeclarationWithType * > ReturnVals;
 		ReturnVals returnVals;
-		std::stack< ReturnVals > returnValsStack;
 	};
 
@@ -247,7 +245,7 @@
 
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {
-		EnumAndPointerDecayPass epc;
+		PassVisitor<EnumAndPointerDecay> epc;
 		LinkReferenceToTypes lrt( doDebug, 0 );
-		Pass3 pass3( 0 );
+		ForallPointerDecay fpd( 0 );
 		CompoundLiteral compoundliteral;
 		PassVisitor<ValidateGenericParameters> genericParams;
@@ -261,20 +259,20 @@
 		VerifyCtorDtorAssign::verify( translationUnit );  // must happen before autogen, because autogen examines existing ctor/dtors
 		Concurrency::applyKeywords( translationUnit );
-		autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass
+		autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
 		Concurrency::implementMutexFuncs( translationUnit );
 		Concurrency::implementThreadStarter( translationUnit );
 		ReturnChecker::checkFunctionReturns( translationUnit );
 		compoundliteral.mutateDeclarationList( translationUnit );
-		acceptAll( translationUnit, pass3 );
+		acceptAll( translationUnit, fpd );
 		ArrayLength::computeLength( translationUnit );
 	}
 
 	void validateType( Type *type, const Indexer *indexer ) {
-		EnumAndPointerDecayPass epc;
+		PassVisitor<EnumAndPointerDecay> epc;
 		LinkReferenceToTypes lrt( false, indexer );
-		Pass3 pass3( indexer );
+		ForallPointerDecay fpd( indexer );
 		type->accept( epc );
 		type->accept( lrt );
-		type->accept( pass3 );
+		type->accept( fpd );
 	}
 
@@ -355,5 +353,5 @@
 	}
 
-	void EnumAndPointerDecayPass::visit( EnumDecl *enumDecl ) {
+	void EnumAndPointerDecay::previsit( EnumDecl *enumDecl ) {
 		// Set the type of each member of the enumeration to be EnumConstant
 		for ( std::list< Declaration * >::iterator i = enumDecl->get_members().begin(); i != enumDecl->get_members().end(); ++i ) {
@@ -362,5 +360,4 @@
 			obj->set_type( new EnumInstType( Type::Qualifiers( Type::Const ), enumDecl->get_name() ) );
 		} // for
-		Parent::visit( enumDecl );
 	}
 
@@ -369,5 +366,5 @@
 		void fixFunctionList( DWTList & dwts, FunctionType * func ) {
 			// the only case in which "void" is valid is where it is the only one in the list; then it should be removed
-			// entirely other fix ups are handled by the FixFunction class
+			// entirely. other fix ups are handled by the FixFunction class
 			typedef typename DWTList::iterator DWTIterator;
 			DWTIterator begin( dwts.begin() ), end( dwts.end() );
@@ -388,5 +385,5 @@
 				for ( ; i != end; ++i ) {
 					FixFunction fixer;
-					*i = (*i )->acceptMutator( fixer );
+					*i = (*i)->acceptMutator( fixer );
 					if ( fixer.get_isVoid() ) {
 						throw SemanticError( "invalid type void in function type ", func );
@@ -397,9 +394,8 @@
 	}
 
-	void EnumAndPointerDecayPass::visit( FunctionType *func ) {
+	void EnumAndPointerDecay::previsit( FunctionType *func ) {
 		// Fix up parameters and return types
 		fixFunctionList( func->get_parameters(), func );
 		fixFunctionList( func->get_returnVals(), func );
-		Visitor::visit( func );
 	}
 
@@ -548,5 +544,5 @@
 	}
 
-	Pass3::Pass3( const Indexer *other_indexer ) :  Indexer( false ) {
+	ForallPointerDecay::ForallPointerDecay( const Indexer *other_indexer ) :  Indexer( false ) {
 		if ( other_indexer ) {
 			indexer = other_indexer;
@@ -586,5 +582,5 @@
 	}
 
-	void Pass3::visit( ObjectDecl *object ) {
+	void ForallPointerDecay::visit( ObjectDecl *object ) {
 		forallFixer( object->get_type() );
 		if ( PointerType *pointer = dynamic_cast< PointerType * >( object->get_type() ) ) {
@@ -595,5 +591,5 @@
 	}
 
-	void Pass3::visit( FunctionDecl *func ) {
+	void ForallPointerDecay::visit( FunctionDecl *func ) {
 		forallFixer( func->get_type() );
 		Parent::visit( func );
@@ -607,10 +603,6 @@
 
 	void ReturnChecker::previsit( FunctionDecl * functionDecl ) {
-		returnValsStack.push( returnVals );
+		GuardValue( returnVals );
 		returnVals = functionDecl->get_functionType()->get_returnVals();
-	}
-	void ReturnChecker::postvisit( __attribute__((unused)) FunctionDecl * functionDecl ) {
-		returnVals = returnValsStack.top();
-		returnValsStack.pop();
 	}
 
@@ -927,4 +919,5 @@
 				ret->set_name( toString( "_retval_", CodeGen::genName( functionDecl ) ) );
 			}
+			ret->get_attributes().push_back( new Attribute( "unused" ) );
 		}
 	}
Index: src/SynTree/Attribute.h
===================================================================
--- src/SynTree/Attribute.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Attribute.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -40,4 +40,6 @@
 };
 
+const std::list< Attribute * > noAttributes;
+
 #endif
 
Index: src/SynTree/BaseSyntaxNode.h
===================================================================
--- src/SynTree/BaseSyntaxNode.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/BaseSyntaxNode.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -24,5 +24,7 @@
 	CodeLocation location;
 
-	virtual void accept( Visitor & v ) = 0; // temporary -- needs to be here so that BaseSyntaxNode is polymorphic and can be dynamic_cast
+	virtual ~BaseSyntaxNode() {}
+
+	virtual void accept( Visitor & v ) = 0;
 };
 
Index: src/SynTree/Constant.cc
===================================================================
--- src/SynTree/Constant.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Constant.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 30 15:18:38 2015
-// Update Count     : 12
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 10:11:00 2017
+// Update Count     : 28
 //
 
@@ -21,29 +21,31 @@
 #include "Type.h"
 
-Constant::Constant( Type *type_, std::string value_ ) : type( type_ ), value( value_ ) {}
+Constant::Constant( Type * type, std::string rep, unsigned long long val ) : type( type ), rep( rep ), val( val ) {}
+Constant::Constant( Type * type, std::string rep, double val ) : type( type ), rep( rep ), val( val ) {}
 
-Constant::Constant( const Constant &other ) {
+Constant::Constant( const Constant &other ) : rep( other.rep ), val( other.val ) {
 	type = other.type->clone();
-	value = other.value;
 }
 
 Constant::~Constant() { delete type; }
 
+Constant Constant::from_bool( bool b ) {
+	return Constant( new BasicType( Type::Qualifiers(), BasicType::Bool ), b ? "1" : "0" , (unsigned long long int)b );
+}
+
 Constant Constant::from_int( int i ) {
-	return Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), std::to_string( i ) );
+	return Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), std::to_string( i ), (unsigned long long int)i );
 }
 
 Constant Constant::from_ulong( unsigned long i ) {
-	return Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::to_string( i ) );
+	return Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::to_string( i ), (unsigned long long int)i );
 }
 
 Constant Constant::from_double( double d ) {
-	return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ) );
+	return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ), d );
 }
 
-Constant *Constant::clone() const { assert( false ); return 0; }
-
 void Constant::print( std::ostream &os ) const {
-	os << "(" << value;
+	os << "(" << rep << " " << val.ival;
 	if ( type ) {
 		os << ": ";
Index: src/SynTree/Constant.h
===================================================================
--- src/SynTree/Constant.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Constant.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jun 30 13:33:17 2016
-// Update Count     : 6
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 10:13:00 2017
+// Update Count     : 15
 //
 
@@ -23,13 +23,16 @@
 class Constant {
   public:
-	Constant( Type *type, std::string value );
-	Constant( const Constant &other );
+	Constant( Type * type, std::string rep, unsigned long long val );
+	Constant( Type * type, std::string rep, double val );
+	Constant( const Constant & other );
 	virtual ~Constant();
 
-	Type *get_type() { return type; }
-	void set_type( Type *newValue ) { type = newValue; }
-	std::string &get_value() { return value; }
-	void set_value( std::string newValue ) { value = newValue; }
+	Type * get_type() { return type; }
+	void set_type( Type * newValue ) { type = newValue; }
+	std::string & get_value() { return rep; }
+	void set_value( std::string newValue ) { rep = newValue; }
 
+	/// generates a boolean constant of the given bool
+	static Constant from_bool( bool b );
 	/// generates an integer constant of the given int
 	static Constant from_int( int i );
@@ -39,11 +42,16 @@
 	static Constant from_double( double d );
 
-	virtual Constant *clone() const;
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Constant *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os ) const;
   private:
-	Type *type;
-	std::string value;
+	Type * type;
+	std::string rep;
+	union Val {
+		unsigned long long ival;
+		double dval;
+		Val( unsigned long long ival ) : ival( ival ) {}
+		Val( double dval ) : dval( dval ) {}
+	} val;
 };
 
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Expression.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -288,6 +288,4 @@
 }
 
-// CastExpr *CastExpr::clone() const { return 0; }
-
 void CastExpr::print( std::ostream &os, int indent ) const {
 	os << "Cast of:" << std::endl << std::string( indent+2, ' ' );
@@ -355,5 +353,4 @@
 }
 
-//// is this right? It's cloning the member, but the member is a declaration so probably shouldn't be cloned...
 MemberExpr::MemberExpr( const MemberExpr &other ) :
 		Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) {
@@ -361,5 +358,5 @@
 
 MemberExpr::~MemberExpr() {
-	// delete member;
+	// don't delete the member declaration, since it points somewhere else in the tree
 	delete aggregate;
 }
@@ -591,14 +588,4 @@
 }
 
-UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
-
-UntypedValofExpr::~UntypedValofExpr() { delete body; }
-
-void UntypedValofExpr::print( std::ostream &os, int indent ) const {
-	os << std::string( indent, ' ' ) << "Valof Expression: " << std::endl;
-	if ( get_body() != 0 )
-		get_body()->print( os, indent + 2 );
-}
-
 RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {}
 RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
Index: src/SynTree/Expression.h
===================================================================
--- src/SynTree/Expression.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Expression.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -226,5 +226,6 @@
 };
 
-/// MemberExpr represents a member selection operation, e.g. q.p after processing by the expression analyzer
+/// MemberExpr represents a member selection operation, e.g. q.p after processing by the expression analyzer.
+/// Does not take ownership of member.
 class MemberExpr : public Expression {
   public:
@@ -247,5 +248,6 @@
 };
 
-/// VariableExpr represents an expression that simply refers to the value of a named variable
+/// VariableExpr represents an expression that simply refers to the value of a named variable.
+/// Does not take ownership of var.
 class VariableExpr : public Expression {
   public:
@@ -598,22 +600,4 @@
 };
 
-/// ValofExpr represents a GCC 'lambda expression'
-class UntypedValofExpr : public Expression {
-  public:
-	UntypedValofExpr( Statement *_body, Expression *_aname = nullptr ) : Expression( _aname ), body ( _body ) {}
-	UntypedValofExpr( const UntypedValofExpr & other );
-	virtual ~UntypedValofExpr();
-
-	Expression * get_value();
-	Statement * get_body() const { return body; }
-
-	virtual UntypedValofExpr * clone() const { return new UntypedValofExpr( * this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Statement * body;
-};
-
 /// RangeExpr represents a range e.g. '3 ... 5' or '1~10'
 class RangeExpr : public Expression {
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Mutator.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Thu Mar  8 16:36:00 2017
-// Update Count     : 23
+// Last Modified On : Thu Jun 22 13:43:00 2017
+// Update Count     : 24
 //
 
@@ -162,4 +162,5 @@
 	tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
 	mutateAll( tryStmt->get_catchers(), *this );
+	tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
 	return tryStmt;
 }
@@ -167,4 +168,5 @@
 Statement *Mutator::mutate( CatchStmt *catchStmt ) {
 	catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
+	catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
 	catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) );
 	return catchStmt;
@@ -380,10 +382,4 @@
 }
 
-Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) {
-	valofExpr->set_env( maybeMutate( valofExpr->get_env(), *this ) );
-	valofExpr->set_result( maybeMutate( valofExpr->get_result(), *this ) );
-	return valofExpr;
-}
-
 Expression *Mutator::mutate( RangeExpr *rangeExpr ) {
 	rangeExpr->set_env( maybeMutate( rangeExpr->get_env(), *this ) );
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Mutator.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -78,5 +78,4 @@
 	virtual Expression* mutate( ConstructorExpr *ctorExpr );
 	virtual Expression* mutate( CompoundLiteralExpr *compLitExpr );
-	virtual Expression* mutate( UntypedValofExpr *valofExpr );
 	virtual Expression* mutate( RangeExpr *rangeExpr );
 	virtual Expression* mutate( UntypedTupleExpr *tupleExpr );
Index: src/SynTree/ObjectDecl.cc
===================================================================
--- src/SynTree/ObjectDecl.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/ObjectDecl.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -56,7 +56,7 @@
 
 	if ( init ) {
-		os << " with initializer ";
-		init->print( os, indent );
-		os << std::endl << std::string(indent, ' ');
+		os << " with initializer " << std::endl;
+		init->print( os, indent+2 );
+		os << std::endl << std::string(indent+2, ' ');
 		os << "maybeConstructed? " << init->get_maybeConstructed();
 	} // if
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Statement.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -313,5 +313,5 @@
 }
 
-TryStmt::TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<Statement *> &_handlers, FinallyStmt *_finallyBlock ) :
+TryStmt::TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<CatchStmt *> &_handlers, FinallyStmt *_finallyBlock ) :
 	Statement( labels ), block( tryBlock ),  handlers( _handlers ), finallyBlock( _finallyBlock ) {
 }
@@ -334,5 +334,5 @@
 	// handlers
 	os << string( indent + 2, ' ' ) << "and handlers: " << endl;
-	for ( std::list<Statement *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
+	for ( std::list<CatchStmt *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
 		(*i )->print( os, indent + 4 );
 
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Statement.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -315,5 +315,5 @@
 class TryStmt : public Statement {
   public:
-	TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<Statement *> &handlers, FinallyStmt *finallyBlock = 0 );
+	TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
 	TryStmt( const TryStmt &other );
 	virtual ~TryStmt();
@@ -321,5 +321,5 @@
 	CompoundStmt *get_block() const { return block; }
 	void set_block( CompoundStmt *newValue ) { block = newValue; }
-	std::list<Statement *>& get_catchers() { return handlers; }
+	std::list<CatchStmt *>& get_catchers() { return handlers; }
 
 	FinallyStmt *get_finally() const { return finallyBlock; }
@@ -333,5 +333,5 @@
   private:
 	CompoundStmt *block;
-	std::list<Statement *> handlers;
+	std::list<CatchStmt *> handlers;
 	FinallyStmt *finallyBlock;
 };
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Visitor.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Thu Jun  8 16:31:00 2017
-// Update Count     : 25
+// Last Modified On : Thu Jun 22 13:41:00 2017
+// Update Count     : 26
 //
 
@@ -137,8 +137,10 @@
 	maybeAccept( tryStmt->get_block(), *this );
 	acceptAll( tryStmt->get_catchers(), *this );
+	maybeAccept( tryStmt->get_finally(), *this );
 }
 
 void Visitor::visit( CatchStmt *catchStmt ) {
 	maybeAccept( catchStmt->get_decl(), *this );
+	maybeAccept( catchStmt->get_cond(), *this );
 	maybeAccept( catchStmt->get_body(), *this );
 }
@@ -299,9 +301,4 @@
 	maybeAccept( compLitExpr->get_result(), *this );
 	maybeAccept( compLitExpr->get_initializer(), *this );
-}
-
-void Visitor::visit( UntypedValofExpr *valofExpr ) {
-	maybeAccept( valofExpr->get_result(), *this );
-	maybeAccept( valofExpr->get_body(), *this );
 }
 
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/SynTree/Visitor.h	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -81,5 +81,4 @@
 	virtual void visit( ConstructorExpr * ctorExpr );
 	virtual void visit( CompoundLiteralExpr *compLitExpr );
-	virtual void visit( UntypedValofExpr *valofExpr );
 	virtual void visit( RangeExpr *rangeExpr );
 	virtual void visit( UntypedTupleExpr *tupleExpr );
@@ -163,5 +162,5 @@
 			} // if
 		} catch( SemanticError &e ) {
-			e.set_location( (*i)->location );			
+			e.set_location( (*i)->location );
 			errors.append( e );
 		} // try
Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/Tuples/TupleExpansion.cc	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -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 08:05:17 2017
-// Update Count     : 15
+// Last Modified On : Wed Jun 21 17:35:04 2017
+// Update Count     : 19
 //
 
@@ -191,10 +191,10 @@
 				commaExpr->set_arg1( nullptr );
 			}
-			BasicType * boolType = new BasicType( Type::Qualifiers(), BasicType::Bool );
-			ObjectDecl * finished = new ObjectDecl( toString( "_unq", id, "_finished_" ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ), new SingleInit( new ConstantExpr( Constant( boolType->clone(), "0" ) ), noDesignators ) );
+			ObjectDecl * finished = new ObjectDecl( toString( "_unq", id, "_finished_" ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ),
+													new SingleInit( new ConstantExpr( Constant::from_int( 0 ) ), noDesignators ) );
 			addDeclaration( finished );
 			// (finished ? _unq_expr_N : (_unq_expr_N = <unqExpr->get_expr()>, finished = 1, _unq_expr_N))
 			// This pattern ensures that each unique expression is evaluated once, regardless of evaluation order of the generated C code.
-			Expression * assignFinished = UntypedExpr::createAssign( new VariableExpr(finished), new ConstantExpr( Constant( boolType->clone(), "1" ) ) );
+			Expression * assignFinished = UntypedExpr::createAssign( new VariableExpr(finished), new ConstantExpr( Constant::from_int( 1 ) ) );
 			ConditionalExpr * condExpr = new ConditionalExpr( new VariableExpr( finished ), var->clone(),
 				new CommaExpr( new CommaExpr( assignUnq, assignFinished ), var->clone() ) );
Index: src/tests/.expect/32/KRfunctions.txt
===================================================================
--- src/tests/.expect/32/KRfunctions.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/32/KRfunctions.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -6,11 +6,11 @@
 extern int printf(const char *__restrict __format, ...);
 int __f0__Fi_iPCii__1(int __a__i_1, const int *__b__PCi_1, int __c__i_1){
-    int ___retval_f0__i_1;
+    __attribute__ ((unused)) int ___retval_f0__i_1;
 }
 int __f1__Fi_PiiPi__1(int *__a__Pi_1, __attribute__ ((unused)) int __b__i_1, int *__c__Pi_1){
-    int ___retval_f1__i_1;
+    __attribute__ ((unused)) int ___retval_f1__i_1;
 }
 int __f2__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f2__i_1;
+    __attribute__ ((unused)) int ___retval_f2__i_1;
 }
 struct S {
@@ -40,27 +40,27 @@
 }
 int __f3__Fi_2sS2sSPi__1(struct S __a__2sS_1, struct S __b__2sS_1, int *__c__Pi_1){
-    int ___retval_f3__i_1;
+    __attribute__ ((unused)) int ___retval_f3__i_1;
     struct S __s__2sS_2;
 }
 int __f4__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f4__i_1;
+    __attribute__ ((unused)) int ___retval_f4__i_1;
 }
 int __f5__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f5__i_1;
+    __attribute__ ((unused)) int ___retval_f5__i_1;
 }
 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __anonymous_object0){
-    int (*___retval_f6__PFi_i__1)(int __anonymous_object1);
+    __attribute__ ((unused)) int (*___retval_f6__PFi_i__1)(int __anonymous_object1);
 }
 int (*__f7__FPFi_ii__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __a__i_1, int __b__i_1){
-    int (*___retval_f7__PFi_ii__1)(int __a__i_1, int __b__i_1);
+    __attribute__ ((unused)) int (*___retval_f7__PFi_ii__1)(int __a__i_1, int __b__i_1);
 }
 int *__f8__FPi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int *___retval_f8__Pi_1;
+    __attribute__ ((unused)) int *___retval_f8__Pi_1;
 }
 int *const __f9__FCPi_PiiPi__1(int *__a__Pi_1, int __b__i_1, int *__c__Pi_1){
-    int *const ___retval_f9__CPi_1;
+    __attribute__ ((unused)) int *const ___retval_f9__CPi_1;
 }
 int *(*__f10__FPFPi_ii__iPiPid__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1, double __y__d_1))(int __x__i_1, int __y__i_1){
-    int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1);
+    __attribute__ ((unused)) int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1);
     int *__x__FPi_ii__2(int __anonymous_object2, int __anonymous_object3);
     ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */);
@@ -68,17 +68,17 @@
 }
 int (*__f11__FPA0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[]{
-    int (*___retval_f11__PA0i_1)[];
+    __attribute__ ((unused)) int (*___retval_f11__PA0i_1)[];
 }
 int (*__f12__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((unsigned int )10)]{
-    int (*___retval_f12__PA0A0i_1)[][((unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f12__PA0A0i_1)[][((unsigned int )10)];
 }
 int (*__f13__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((unsigned int )10)]{
-    int (*___retval_f13__PA0A0i_1)[][((unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f13__PA0A0i_1)[][((unsigned int )10)];
 }
 int (*__f14__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((unsigned int )10)]{
-    int (*___retval_f14__PA0A0i_1)[][((unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f14__PA0A0i_1)[][((unsigned int )10)];
 }
 const int __fred__FCi___1(){
-    const int ___retval_fred__Ci_1;
+    __attribute__ ((unused)) const int ___retval_fred__Ci_1;
     int *(*__x__PFPi_ii__2)(int __anonymous_object4, int __anonymous_object5);
     int __a__i_2;
@@ -88,8 +88,8 @@
     ((void)((*((int *(**)(int __x__i_1, int __y__i_1))(&_tmp_cp_ret0)))) /* ^?{} */);
     const int __f1__FCi_iPiPi__2(int __a__i_2, int *__b__Pi_2, int *__c__Pi_2){
-        const int ___retval_f1__Ci_2;
+        __attribute__ ((unused)) const int ___retval_f1__Ci_2;
     }
     const int __f2__FCi_iii__2(int __a__i_2, int __b__i_2, int __c__i_2){
-        const int ___retval_f2__Ci_2;
+        __attribute__ ((unused)) const int ___retval_f2__Ci_2;
     }
 }
Index: src/tests/.expect/32/attributes.txt
===================================================================
--- src/tests/.expect/32/attributes.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/32/attributes.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -6,5 +6,5 @@
 extern int printf(const char *__restrict __format, ...);
 int __la__Fi___1(){
-    int ___retval_la__i_1;
+    __attribute__ ((unused)) int ___retval_la__i_1;
     L: __attribute__ ((unused)) ((void)1);
 }
@@ -226,20 +226,20 @@
 __attribute__ ((unused,used)) int __f1__Fi___1();
 __attribute__ ((unused)) int __f1__Fi___1(){
-    int ___retval_f1__i_1;
+    __attribute__ ((unused)) int ___retval_f1__i_1;
 }
 __attribute__ ((unused,unused,unused,used)) int **const __f2__FCPPi___1();
 __attribute__ ((unused,unused,unused)) int **const __f2__FCPPi___1(){
-    int **const ___retval_f2__CPPi_1;
+    __attribute__ ((unused)) int **const ___retval_f2__CPPi_1;
 }
 __attribute__ ((unused,used,unused)) int (*__f3__FPA0i_i__1(int __anonymous_object1))[];
 __attribute__ ((unused,unused)) int (*__f3__FPA0i_i__1(int __p__i_1))[]{
-    int (*___retval_f3__PA0i_1)[];
+    __attribute__ ((unused)) int (*___retval_f3__PA0i_1)[];
 }
 __attribute__ ((unused,used,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object2);
 __attribute__ ((unused,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object3){
-    int (*___retval_f4__PFi_i__1)(int __anonymous_object4);
+    __attribute__ ((unused)) int (*___retval_f4__PFi_i__1)(int __anonymous_object4);
 }
 int __vtr__Fi___1(){
-    int ___retval_vtr__i_1;
+    __attribute__ ((unused)) int ___retval_vtr__i_1;
     __attribute__ ((unused,unused,used)) int __t1__i_2;
     __attribute__ ((unused,unused,unused,unused,unused)) int **__t2__PPi_2;
@@ -251,17 +251,17 @@
 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1);
 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1){
-    int ___retval_ipd1__i_1;
+    __attribute__ ((unused)) int ___retval_ipd1__i_1;
 }
 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1);
 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){
-    int ___retval_ipd2__i_1;
+    __attribute__ ((unused)) int ___retval_ipd2__i_1;
 }
 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1);
 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){
-    int ___retval_ipd3__i_1;
+    __attribute__ ((unused)) int ___retval_ipd3__i_1;
 }
 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)());
 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)()){
-    int ___retval_ipd4__i_1;
+    __attribute__ ((unused)) int ___retval_ipd4__i_1;
 }
 int __tpr1__Fi_i__1(__attribute__ ((unused,unused,unused)) int __Foo__i_1);
@@ -273,5 +273,5 @@
 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object7)(__attribute__ ((unused)) int (*__anonymous_object8)(__attribute__ ((unused,unused)) int __anonymous_object9)));
 int __ad__Fi___1(){
-    int ___retval_ad__i_1;
+    __attribute__ ((unused)) int ___retval_ad__i_1;
     __attribute__ ((used,unused)) int __ad1__i_2;
     __attribute__ ((unused,unused,unused)) int *__ad2__Pi_2;
Index: src/tests/.expect/32/declarationSpecifier.txt
===================================================================
--- src/tests/.expect/32/declarationSpecifier.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/32/declarationSpecifier.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -670,5 +670,5 @@
 static inline volatile const short __f48__FCVs___1();
 int __main__Fi_iPPCc__1(int __argc__i_1, const char **__argv__PPCc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     ((void)(___retval_main__i_1=((int )0)) /* ?{} */);
     return ((int )___retval_main__i_1);
@@ -685,5 +685,5 @@
 static inline int invoke_main(int argc, char **argv, char **envp);
 int main(int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     int _tmp_cp_ret0;
     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
Index: src/tests/.expect/32/extension.txt
===================================================================
--- src/tests/.expect/32/extension.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/32/extension.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -85,5 +85,5 @@
 __extension__ int j;
 __extension__ int __fred__Fi_i__1(int __p__i_1){
-    int ___retval_fred__i_1;
+    __attribute__ ((unused)) int ___retval_fred__i_1;
     __extension__ struct S {
         __extension__ int __a__i_2;
@@ -105,5 +105,5 @@
     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     __extension__ int __mary__Fi_i__2(int __p__i_2){
-        int ___retval_mary__i_2;
+        __attribute__ ((unused)) int ___retval_mary__i_2;
     }
     ((void)__extension__ sizeof(3));
Index: src/tests/.expect/32/gccExtensions.txt
===================================================================
--- src/tests/.expect/32/gccExtensions.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/32/gccExtensions.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -7,5 +7,5 @@
 extern int __x__i_1 asm ( "xx" );
 int __main__Fi_iPPCc__1(int __argc__i_1, const char **__argv__PPCc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
@@ -26,8 +26,8 @@
     const int __i3__Ci_2;
     inline int __f1__Fi___2(){
-        int ___retval_f1__i_2;
+        __attribute__ ((unused)) int ___retval_f1__i_2;
     }
     inline int __f2__Fi___2(){
-        int ___retval_f2__i_2;
+        __attribute__ ((unused)) int ___retval_f2__i_2;
     }
     int __s1__i_2;
@@ -182,5 +182,5 @@
 static inline int invoke_main(int argc, char **argv, char **envp);
 int main(int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     int _tmp_cp_ret0;
     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
Index: src/tests/.expect/64/KRfunctions.txt
===================================================================
--- src/tests/.expect/64/KRfunctions.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/64/KRfunctions.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -6,11 +6,11 @@
 extern int printf(const char *__restrict __format, ...);
 int __f0__Fi_iPCii__1(int __a__i_1, const int *__b__PCi_1, int __c__i_1){
-    int ___retval_f0__i_1;
+    __attribute__ ((unused)) int ___retval_f0__i_1;
 }
 int __f1__Fi_PiiPi__1(int *__a__Pi_1, __attribute__ ((unused)) int __b__i_1, int *__c__Pi_1){
-    int ___retval_f1__i_1;
+    __attribute__ ((unused)) int ___retval_f1__i_1;
 }
 int __f2__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f2__i_1;
+    __attribute__ ((unused)) int ___retval_f2__i_1;
 }
 struct S {
@@ -40,27 +40,27 @@
 }
 int __f3__Fi_2sS2sSPi__1(struct S __a__2sS_1, struct S __b__2sS_1, int *__c__Pi_1){
-    int ___retval_f3__i_1;
+    __attribute__ ((unused)) int ___retval_f3__i_1;
     struct S __s__2sS_2;
 }
 int __f4__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f4__i_1;
+    __attribute__ ((unused)) int ___retval_f4__i_1;
 }
 int __f5__Fi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int ___retval_f5__i_1;
+    __attribute__ ((unused)) int ___retval_f5__i_1;
 }
 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __anonymous_object0){
-    int (*___retval_f6__PFi_i__1)(int __anonymous_object1);
+    __attribute__ ((unused)) int (*___retval_f6__PFi_i__1)(int __anonymous_object1);
 }
 int (*__f7__FPFi_ii__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __a__i_1, int __b__i_1){
-    int (*___retval_f7__PFi_ii__1)(int __a__i_1, int __b__i_1);
+    __attribute__ ((unused)) int (*___retval_f7__PFi_ii__1)(int __a__i_1, int __b__i_1);
 }
 int *__f8__FPi_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1){
-    int *___retval_f8__Pi_1;
+    __attribute__ ((unused)) int *___retval_f8__Pi_1;
 }
 int *const __f9__FCPi_PiiPi__1(int *__a__Pi_1, int __b__i_1, int *__c__Pi_1){
-    int *const ___retval_f9__CPi_1;
+    __attribute__ ((unused)) int *const ___retval_f9__CPi_1;
 }
 int *(*__f10__FPFPi_ii__iPiPid__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1, double __y__d_1))(int __x__i_1, int __y__i_1){
-    int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1);
+    __attribute__ ((unused)) int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1);
     int *__x__FPi_ii__2(int __anonymous_object2, int __anonymous_object3);
     ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */);
@@ -68,17 +68,17 @@
 }
 int (*__f11__FPA0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[]{
-    int (*___retval_f11__PA0i_1)[];
+    __attribute__ ((unused)) int (*___retval_f11__PA0i_1)[];
 }
 int (*__f12__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((long unsigned int )10)]{
-    int (*___retval_f12__PA0A0i_1)[][((long unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f12__PA0A0i_1)[][((long unsigned int )10)];
 }
 int (*__f13__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((long unsigned int )10)]{
-    int (*___retval_f13__PA0A0i_1)[][((long unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f13__PA0A0i_1)[][((long unsigned int )10)];
 }
 int (*__f14__FPA0A0i_iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))[][((long unsigned int )10)]{
-    int (*___retval_f14__PA0A0i_1)[][((long unsigned int )10)];
+    __attribute__ ((unused)) int (*___retval_f14__PA0A0i_1)[][((long unsigned int )10)];
 }
 const int __fred__FCi___1(){
-    const int ___retval_fred__Ci_1;
+    __attribute__ ((unused)) const int ___retval_fred__Ci_1;
     int *(*__x__PFPi_ii__2)(int __anonymous_object4, int __anonymous_object5);
     int __a__i_2;
@@ -88,8 +88,8 @@
     ((void)((*((int *(**)(int __x__i_1, int __y__i_1))(&_tmp_cp_ret0)))) /* ^?{} */);
     const int __f1__FCi_iPiPi__2(int __a__i_2, int *__b__Pi_2, int *__c__Pi_2){
-        const int ___retval_f1__Ci_2;
+        __attribute__ ((unused)) const int ___retval_f1__Ci_2;
     }
     const int __f2__FCi_iii__2(int __a__i_2, int __b__i_2, int __c__i_2){
-        const int ___retval_f2__Ci_2;
+        __attribute__ ((unused)) const int ___retval_f2__Ci_2;
     }
 }
Index: src/tests/.expect/64/attributes.txt
===================================================================
--- src/tests/.expect/64/attributes.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/64/attributes.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -6,5 +6,5 @@
 extern int printf(const char *__restrict __format, ...);
 int __la__Fi___1(){
-    int ___retval_la__i_1;
+    __attribute__ ((unused)) int ___retval_la__i_1;
     L: __attribute__ ((unused)) ((void)1);
 }
@@ -226,20 +226,20 @@
 __attribute__ ((unused,used)) int __f1__Fi___1();
 __attribute__ ((unused)) int __f1__Fi___1(){
-    int ___retval_f1__i_1;
+    __attribute__ ((unused)) int ___retval_f1__i_1;
 }
 __attribute__ ((unused,unused,unused,used)) int **const __f2__FCPPi___1();
 __attribute__ ((unused,unused,unused)) int **const __f2__FCPPi___1(){
-    int **const ___retval_f2__CPPi_1;
+    __attribute__ ((unused)) int **const ___retval_f2__CPPi_1;
 }
 __attribute__ ((unused,used,unused)) int (*__f3__FPA0i_i__1(int __anonymous_object1))[];
 __attribute__ ((unused,unused)) int (*__f3__FPA0i_i__1(int __p__i_1))[]{
-    int (*___retval_f3__PA0i_1)[];
+    __attribute__ ((unused)) int (*___retval_f3__PA0i_1)[];
 }
 __attribute__ ((unused,used,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object2);
 __attribute__ ((unused,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object3){
-    int (*___retval_f4__PFi_i__1)(int __anonymous_object4);
+    __attribute__ ((unused)) int (*___retval_f4__PFi_i__1)(int __anonymous_object4);
 }
 int __vtr__Fi___1(){
-    int ___retval_vtr__i_1;
+    __attribute__ ((unused)) int ___retval_vtr__i_1;
     __attribute__ ((unused,unused,used)) int __t1__i_2;
     __attribute__ ((unused,unused,unused,unused,unused)) int **__t2__PPi_2;
@@ -251,17 +251,17 @@
 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1);
 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1){
-    int ___retval_ipd1__i_1;
+    __attribute__ ((unused)) int ___retval_ipd1__i_1;
 }
 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1);
 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){
-    int ___retval_ipd2__i_1;
+    __attribute__ ((unused)) int ___retval_ipd2__i_1;
 }
 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1);
 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){
-    int ___retval_ipd3__i_1;
+    __attribute__ ((unused)) int ___retval_ipd3__i_1;
 }
 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)());
 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)()){
-    int ___retval_ipd4__i_1;
+    __attribute__ ((unused)) int ___retval_ipd4__i_1;
 }
 int __tpr1__Fi_i__1(__attribute__ ((unused,unused,unused)) int __Foo__i_1);
@@ -273,5 +273,5 @@
 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object7)(__attribute__ ((unused)) int (*__anonymous_object8)(__attribute__ ((unused,unused)) int __anonymous_object9)));
 int __ad__Fi___1(){
-    int ___retval_ad__i_1;
+    __attribute__ ((unused)) int ___retval_ad__i_1;
     __attribute__ ((used,unused)) int __ad1__i_2;
     __attribute__ ((unused,unused,unused)) int *__ad2__Pi_2;
Index: src/tests/.expect/64/declarationSpecifier.txt
===================================================================
--- src/tests/.expect/64/declarationSpecifier.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/64/declarationSpecifier.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -670,5 +670,5 @@
 static inline volatile const short __f48__FCVs___1();
 int __main__Fi_iPPCc__1(int __argc__i_1, const char **__argv__PPCc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     ((void)(___retval_main__i_1=((int )0)) /* ?{} */);
     return ((int )___retval_main__i_1);
@@ -685,5 +685,5 @@
 static inline int invoke_main(int argc, char **argv, char **envp);
 int main(int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     int _tmp_cp_ret0;
     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
Index: src/tests/.expect/64/extension.txt
===================================================================
--- src/tests/.expect/64/extension.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/64/extension.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -85,5 +85,5 @@
 __extension__ int j;
 __extension__ int __fred__Fi_i__1(int __p__i_1){
-    int ___retval_fred__i_1;
+    __attribute__ ((unused)) int ___retval_fred__i_1;
     __extension__ struct S {
         __extension__ int __a__i_2;
@@ -105,5 +105,5 @@
     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     __extension__ int __mary__Fi_i__2(int __p__i_2){
-        int ___retval_mary__i_2;
+        __attribute__ ((unused)) int ___retval_mary__i_2;
     }
     ((void)__extension__ sizeof(3));
Index: src/tests/.expect/64/gccExtensions.txt
===================================================================
--- src/tests/.expect/64/gccExtensions.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/64/gccExtensions.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -7,5 +7,5 @@
 extern int __x__i_1 asm ( "xx" );
 int __main__Fi_iPPCc__1(int __argc__i_1, const char **__argv__PPCc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
@@ -26,8 +26,8 @@
     const int __i3__Ci_2;
     inline int __f1__Fi___2(){
-        int ___retval_f1__i_2;
+        __attribute__ ((unused)) int ___retval_f1__i_2;
     }
     inline int __f2__Fi___2(){
-        int ___retval_f2__i_2;
+        __attribute__ ((unused)) int ___retval_f2__i_2;
     }
     int __s1__i_2;
@@ -182,5 +182,5 @@
 static inline int invoke_main(int argc, char **argv, char **envp);
 int main(int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
-    int ___retval_main__i_1;
+    __attribute__ ((unused)) int ___retval_main__i_1;
     int _tmp_cp_ret0;
     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
Index: src/tests/.expect/scopeErrors.txt
===================================================================
--- src/tests/.expect/scopeErrors.txt	(revision e1c182961b8966ab4842550db21657c05da7715c)
+++ src/tests/.expect/scopeErrors.txt	(revision 4c03e638fae9819012408e0e7c32bfc6407e0c16)
@@ -3,6 +3,7 @@
   with parameters
     double
-  returning 
-    _retval_butThisIsAnError: double
-  with body 
+  returning
+    _retval_butThisIsAnError:       Attribute with name: unused
+double
+  with body
     CompoundStmt
