small bug fixes

This commit is contained in:
rsc 2004-05-23 23:26:59 +00:00
parent 1be1539ea8
commit f1ad497719

View file

@ -343,6 +343,13 @@ typecmp(Type *t, Type *u)
if(i)
return i;
if(t->ty == Aggr){
if(t->n > u->n)
return -1;
if(t->n < u->n)
return 1;
}
if(t->name || t->suename)
return 0;
@ -445,7 +452,7 @@ ttt=ttt->sub;
case Pointer:
ttt = defer(tt->sub);
if(ttt && ttt->ty == Aggr)
Bprint(b, "\tprint(indent, \"%s\t%s(\", addr.%s, \")\\n\");\n",
Bprint(b, "\tprint(indent, \"%s\t(%s)\", addr.%s, \"\\n\");\n",
name, nameof(ttt, 1), name);
else
goto base;