Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision c8dfcd3a4ea472775bb425585268096226f404ce)
+++ src/SymTab/Validate.cc	(revision 0362d42197982e555c473ed139d94d754200a435)
@@ -86,5 +86,5 @@
 
 	/// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers.
-	class Pass1 : public Visitor {
+	class EnumAndPointerDecayPass : public Visitor {
 		typedef Visitor Parent;
 		virtual void visit( EnumDecl *aggregateDecl );
@@ -189,5 +189,5 @@
 
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {
-		Pass1 pass1;
+		EnumAndPointerDecayPass epc;
 		Pass2 pass2( doDebug, 0 );
 		Pass3 pass3( 0 );
@@ -196,6 +196,6 @@
 		EliminateTypedef::eliminateTypedef( translationUnit );
 		HoistStruct::hoistStruct( translationUnit );
-		autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs Pass1
-		acceptAll( translationUnit, pass1 );
+		autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass
+		acceptAll( translationUnit, epc );
 		acceptAll( translationUnit, pass2 );
 		ReturnChecker::checkFunctionReturns( translationUnit );
@@ -206,8 +206,8 @@
 
 	void validateType( Type *type, const Indexer *indexer ) {
-		Pass1 pass1;
+		EnumAndPointerDecayPass epc;
 		Pass2 pass2( false, indexer );
 		Pass3 pass3( indexer );
-		type->accept( pass1 );
+		type->accept( epc );
 		type->accept( pass2 );
 		type->accept( pass3 );
@@ -272,5 +272,5 @@
 	}
 
-	void Pass1::visit( EnumDecl *enumDecl ) {
+	void EnumAndPointerDecayPass::visit( 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 ) {
@@ -296,4 +296,5 @@
 				DWTIterator j = i;
 				++i;
+				delete *j;
 				dwts.erase( j );
 				if ( i != end ) {
@@ -313,5 +314,5 @@
 	}
 
-	void Pass1::visit( FunctionType *func ) {
+	void EnumAndPointerDecayPass::visit( FunctionType *func ) {
 		// Fix up parameters and return types
 		fixFunctionList( func->get_parameters(), func );
