Make call to pow() unambiguous

pow(int, int) is ambiguous since it could use the double version from
the math library or the verinum version. This patch makes it obvious that
we want to use the double version.
This commit is contained in:
Cary R 2011-07-18 14:19:32 -07:00 committed by Stephen Williams
parent 2cb9a2360c
commit b99846e0eb
1 changed files with 13 additions and 13 deletions

26
parse.y
View File

@ -976,21 +976,21 @@ delay_value_simple
delete[]$1;
}
| TIME_LITERAL
{
int unit;
{ int unit;
based_size = 0;
$$ = 0;
if ($1 == 0 || !get_time_unit($1, unit))
yyerror(@1, "internal error: delay.");
else {
double p = pow(10, unit - pform_get_timeunit());
double time = atof($1) * p;
based_size = 0;
$$ = 0;
if ($1 == 0 || !get_time_unit($1, unit))
yyerror(@1, "internal error: delay.");
else {
double p = pow(10.0,
(double)(unit - pform_get_timeunit()));
double time = atof($1) * p;
verireal *v = new verireal(time);
$$ = new PEFNumber(v);
FILE_NAME($$, @1);
}
verireal *v = new verireal(time);
$$ = new PEFNumber(v);
FILE_NAME($$, @1);
}
}
;