[LLVMdev] Patch for non standard usage of math functions

Morten Ofstad morten at hue.no
Tue Oct 19 05:17:30 PDT 2004


In lib/Analysis/ScalarEvolution.cpp there is a call to sqrt with an 
int64_t argument - To make this call in standard C++ a cast to double is 
required.

In lib/CodeGen/LiveIntervalAnalysis.cppn there is a call to pow where 
the second argument is an unsigned int. The standard C++ call is with 
'int' and the compiler does not know if it should promote the unsigned 
int to float or double so it cannot resolve the overloaded pow function. 
I solved this by casting to int...

m.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041019/8bd807a5/attachment.txt>


More information about the llvm-dev mailing list