From b99846e0eb002d22613befdffc2c032bfa5a7d8c Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 18 Jul 2011 14:19:32 -0700 Subject: [PATCH] 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. --- parse.y | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/parse.y b/parse.y index 2f66e6075..117684044 100644 --- a/parse.y +++ b/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); + } } ;