Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 9d7b3ea1ccb5d1eccef1e7382c27f22177146c1a)
+++ src/GenPoly/Box.cc	(revision 3627356cd68ced646615fd33bd46a05914f6da3a)
@@ -227,5 +227,5 @@
 
 		for ( std::list< TypeDecl* >::const_iterator decl = decls.begin(); decl != decls.end(); ++decl ) {
-			if ( decl->get_kind() == TypeDecl::Any ) {
+			if ( (*decl)->get_kind() == TypeDecl::Any ) {
 				otypeDecls.push_back( *decl );
 			}
@@ -276,5 +276,5 @@
 	/// makes an if-statement with a single-expression if-block and no then block
 	Statement *makeCond( Expression *cond, Expression *ifPart ) {
-		return new IfStmt( noLabels, cond, new ExprStmt( ifPart ), 0 );
+		return new IfStmt( noLabels, cond, new ExprStmt( noLabels, ifPart ), 0 );
 	}
 
@@ -303,5 +303,5 @@
 	}
 	
-	virtual Declaration *LayoutFunctionBuilder::mutate( StructDecl *structDecl ) {
+	Declaration *LayoutFunctionBuilder::mutate( StructDecl *structDecl ) {
 		// do not generate layout function for "empty" tag structs
 		if ( structDecl->get_members().empty() ) return structDecl;
@@ -363,5 +363,5 @@
 	}
 	
-	virtual Declaration *LayoutFunctionBuilder::mutate( UnionDecl *unionDecl ) {
+	Declaration *LayoutFunctionBuilder::mutate( UnionDecl *unionDecl ) {
 		// do not generate layout function for "empty" tag unions
 		if ( unionDecl->get_members().empty() ) return unionDecl;
