Index: translator/ResolvExpr/AlternativeFinder.cc
===================================================================
--- translator/ResolvExpr/AlternativeFinder.cc	(revision 2c2242c773dd4781ea54f277dace24b26fca305e)
+++ translator/ResolvExpr/AlternativeFinder.cc	(revision 42e2ad789d5cd89e0f2a67a8f6507c685dbdc4ef)
@@ -756,10 +756,15 @@
 	    alternatives.push_back( Alternative( sizeofExpr->clone(), env, Cost::zero ) );
 	} else {
+	    // find all alternatives for the argument to sizeof
 	    AlternativeFinder finder( indexer, env );
 	    finder.find( sizeofExpr->get_expr() );
-	    if ( finder.alternatives.size() != 1 ) {
+	    // find the lowest cost alternative among the alternatives, otherwise ambiguous
+	    AltList winners;
+	    findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) );
+	    if ( winners.size() != 1 ) {
 		throw SemanticError( "Ambiguous expression in sizeof operand: ", sizeofExpr->get_expr() );
 	    }
-	    Alternative &choice = finder.alternatives.front();
+	    // return the lowest cost alternative for the argument
+	    Alternative &choice = winners.front();
 	    alternatives.push_back( Alternative( new SizeofExpr( choice.expr->clone() ), choice.env, Cost::zero ) );
 	}
Index: translator/ResolvExpr/Resolver.cc
===================================================================
--- translator/ResolvExpr/Resolver.cc	(revision 2c2242c773dd4781ea54f277dace24b26fca305e)
+++ translator/ResolvExpr/Resolver.cc	(revision 42e2ad789d5cd89e0f2a67a8f6507c685dbdc4ef)
@@ -44,4 +44,5 @@
 	acceptAll( translationUnit, resolver );
 #if 0
+	resolver.print( cerr );
 	for ( std::list< Declaration * >::iterator i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
 	    (*i)->print( std::cerr );
@@ -241,4 +242,22 @@
     void Resolver::visit( SingleInit *singleInit ) {
 	if ( singleInit->get_value() ) {
+#if 0
+	    if (NameExpr * ne = dynamic_cast<NameExpr*>(singleInit->get_value())) {
+		string n = ne->get_name();
+		if (n == "0") {
+		    initContext = new BasicType(Type::Qualifiers(), 
+						BasicType::SignedInt);
+		} else {
+		    DeclarationWithType * decl = lookupId(n);
+		    initContext = decl->get_type();
+		}
+	    } else if (ConstantExpr * e = 
+		       dynamic_cast<ConstantExpr*>(singleInit->get_value())) {
+		Constant *c = e->get_constant();
+		initContext = c->get_type();
+	    } else {
+		assert(0);
+	    }
+#endif
 	    CastExpr *castExpr = new CastExpr( singleInit->get_value(), initContext->clone() );
 	    Expression *newExpr = findSingleExpression( castExpr, *this );
@@ -250,7 +269,12 @@
 
     void Resolver::visit( ListInit *listInit ) {
+	Visitor::visit(listInit);
+#if 0
 	if ( ArrayType *at = dynamic_cast<ArrayType*>(initContext) ) {
-	    initContext = at->get_base();
-	    Visitor::visit( listInit );
+	    std::list<Initializer *>::iterator iter( listInit->begin_initializers() );
+	    for ( ; iter != listInit->end_initializers(); ++iter ) {
+		initContext = at->get_base();
+		(*iter)->accept( *this );
+	    } // for
 	} else if ( StructInstType *st = dynamic_cast<StructInstType*>(initContext) ) {
 	    StructDecl *baseStruct = st->get_baseStruct();
@@ -295,4 +319,5 @@
 	    (*listInit->begin_initializers())->accept( *this );
 	} // if
+#endif
     }
 } // namespace ResolvExpr
