re-export of bools was changing

format from hex to decimal, confusing
ar's strcmp-based value comparison.

switched export format to "true" or "false"
to keep bools separate from ints.

R=ken
OCL=22944
CL=22944
This commit is contained in:
Russ Cox 2009-01-16 10:45:28 -08:00
parent 794efd7e78
commit dec12d3654
2 changed files with 14 additions and 3 deletions

View File

@ -133,7 +133,10 @@ dumpexportconst(Sym *s)
Bprint(bout, "%B\n", n->val.u.xval);
break;
case CTBOOL:
Bprint(bout, "0x%llux\n", n->val.u.bval);
if(n->val.u.bval)
Bprint(bout, "true\n");
else
Bprint(bout, "false\n");
break;
case CTFLT:
Bprint(bout, "%F\n", n->val.u.fval);

View File

@ -1969,6 +1969,14 @@ hidden_constant:
yyerror("bad negated constant");
}
}
| LTRUE
{
$$ = booltrue->val;
}
| LFALSE
{
$$ = boolfalse->val;
}
hidden_importsym:
sym1 '.' sym2