Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision de62360d1d2709386152807b3d18e159e241ab1f)
+++ src/ResolvExpr/Resolver.cc	(revision 94e0864d381ec34e8e25850109ea127ff29efbca)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 12:17:01 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jun 24 15:47:16 2015
-// Update Count     : 50
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jun 24 16:08:49 2015
+// Update Count     : 155
 //
 
@@ -38,4 +38,6 @@
 		virtual void visit( TypeDecl *typeDecl );
 
+		virtual void visit( ArrayType * at );
+
 		virtual void visit( ExprStmt *exprStmt );
 		virtual void visit( IfStmt *ifStmt );
@@ -51,4 +53,9 @@
 		virtual void visit( ListInit *listInit );
 	  private:
+  	typedef std::list< Initializer * >::iterator InitIterator;
+
+	  void resolveAggrInit( AggregateDecl *, InitIterator &, InitIterator & );
+	  void resolveSingleAggrInit( Declaration *, InitIterator &, InitIterator & );
+
 		std::list< Type * > functionReturn;
 		Type *initContext;
@@ -158,16 +165,17 @@
 		initContext = new_type;
 		SymTab::Indexer::visit( objectDecl );
-
-		if ( ArrayType * at = dynamic_cast< ArrayType * >( new_type ) ){
-			if ( at->get_dimension() ) {
-				BasicType arrayLenType = BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
-				CastExpr *castExpr = new CastExpr( at->get_dimension(), arrayLenType.clone() );
-				Expression *newExpr = findSingleExpression( castExpr, *this );
-				delete at->get_dimension();
-				at->set_dimension( newExpr );
-			}
-		}
-	}
-  
+	}
+
+	void Resolver::visit( ArrayType * at ) {
+		if ( at->get_dimension() ) {
+			BasicType arrayLenType = BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
+			CastExpr *castExpr = new CastExpr( at->get_dimension(), arrayLenType.clone() );
+			Expression *newExpr = findSingleExpression( castExpr, *this );
+			delete at->get_dimension();
+			at->set_dimension( newExpr );
+		}
+		Visitor::visit( at );
+	}
+
 	void Resolver::visit( TypeDecl *typeDecl ) {
 		if ( typeDecl->get_base() ) {
@@ -177,5 +185,5 @@
 		SymTab::Indexer::visit( typeDecl );
 	}
-  
+
 	void Resolver::visit( FunctionDecl *functionDecl ) {
 #if 0
@@ -284,4 +292,13 @@
 			returnStmt->set_expr( newExpr );
 		} // if
+	}
+
+	template< typename T >
+	bool isCharType( T t ) {
+		if ( BasicType * bt = dynamic_cast< BasicType * >( t ) ) {
+			return bt->get_kind() == BasicType::Char || bt->get_kind() == BasicType::SignedChar || 
+				bt->get_kind() == BasicType::UnsignedChar;
+		}
+		return false;
 	}
 
@@ -310,10 +327,79 @@
 			delete castExpr;
 			singleInit->set_value( newExpr );
+
+			// check if initializing type is char[]
+			if ( ArrayType * at = dynamic_cast< ArrayType * >( initContext ) ) {
+				if ( isCharType( at->get_base() ) ) {
+					// check if the resolved type is char *
+					if ( PointerType * pt = dynamic_cast< PointerType *>( newExpr->get_results().front() ) ) {
+						if ( isCharType( pt->get_base() ) ) {
+							// strip cast if we're initializing a char[] with a char *, e.g.
+							// char x[] = "hello";
+							CastExpr *ce = dynamic_cast< CastExpr * >( newExpr );
+							singleInit->set_value( ce->get_arg() );
+							ce->set_arg( NULL );
+							delete ce;									
+						}
+					}
+				}
+			}
 		} // if
 //	singleInit->get_value()->accept( *this );
 	}
 
-	void Resolver::visit( ListInit *listInit ) {
-		Visitor::visit(listInit);
+	void Resolver::resolveSingleAggrInit( Declaration * dcl, InitIterator & init, InitIterator & initEnd ) {
+		DeclarationWithType * dt = dynamic_cast< DeclarationWithType * >( dcl );
+		assert( dt );
+		initContext = dt->get_type();
+		try {
+			if ( init == initEnd ) return; // stop when there are no more initializers
+			(*init)->accept( *this );
+			++init; // made it past an initializer
+		} catch( SemanticError & ) {
+			// need to delve deeper, if you can
+			if ( StructInstType * sit = dynamic_cast< StructInstType * >( dt->get_type() ) ) {
+				resolveAggrInit( sit->get_baseStruct(), init, initEnd );
+			} else if ( UnionInstType * uit = dynamic_cast< UnionInstType * >( dt->get_type() ) ) {
+				resolveAggrInit( uit->get_baseUnion(), init, initEnd );
+			} else {
+				// might need to rethink what is being thrown
+				throw;
+			} // if
+		}
+	}
+
+	void Resolver::resolveAggrInit( AggregateDecl * aggr, InitIterator & init, InitIterator & initEnd ) {
+		if ( StructDecl * st = dynamic_cast< StructDecl * >( aggr ) ) {
+			// want to resolve each initializer to the members of the struct,
+			// but if there are more initializers than members we should stop
+			list< Declaration * >::iterator it = st->get_members().begin();
+			for ( ; it != st->get_members().end(); ++it) {
+				resolveSingleAggrInit( *it, init, initEnd );
+			}
+		} else if ( UnionDecl * un = dynamic_cast< UnionDecl * >( aggr ) ) {
+			// only resolve to the first member of a union
+			resolveSingleAggrInit( *un->get_members().begin(), init, initEnd );
+		} // if
+	}
+
+	void Resolver::visit( ListInit * listInit ) {
+		InitIterator iter = listInit->begin_initializers();
+		InitIterator end = listInit->end_initializers();
+
+		if ( ArrayType * at = dynamic_cast< ArrayType * >( initContext ) ) {
+			// resolve each member to the base type of the array
+			for ( ; iter != end; ++iter ) {
+				initContext = at->get_base();
+				(*iter)->accept( *this );
+			} // for
+		} else if ( StructInstType * st = dynamic_cast< StructInstType * >( initContext ) ) {
+			resolveAggrInit( st->get_baseStruct(), iter, end );
+		} else if ( UnionInstType *st = dynamic_cast< UnionInstType * >( initContext ) ) {
+			resolveAggrInit( st->get_baseUnion(), iter, end );
+		} else {
+			// basic types are handled here
+			Visitor::visit( listInit );
+		}
+
 #if 0
 		if ( ArrayType *at = dynamic_cast<ArrayType*>(initContext) ) {
