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:
parent
2cb9a2360c
commit
b99846e0eb
26
parse.y
26
parse.y
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue