[LLVMdev] Compiler error: LoopStrengthReduce.cpp
OvermindDL1
overminddl1 at gmail.com
Tue May 12 15:09:56 PDT 2009
The error given:
..\..\..\..\trunk\lib\Transforms\Scalar\LoopStrengthReduce.cpp(1016) :
error C2668: 'abs' : ambiguous call to overloaded function
f:\Program Files\Microsoft Visual Studio
8\VC\include\math.h(539): could be 'long double abs(long double)'
f:\Program Files\Microsoft Visual Studio
8\VC\include\math.h(491): or 'float abs(float)'
f:\Program Files\Microsoft Visual Studio
8\VC\include\math.h(487): or 'double abs(double)'
f:\Program Files\Microsoft Visual Studio
8\VC\include\math.h(485): or 'long abs(long)'
f:\Program Files\Microsoft Visual Studio
8\VC\include\stdlib.h(415): or 'int abs(int)'
while trying to match the argument list '(int64_t)'
It should be rather obvious from the message. The error is in
LoopStrengthReduce.cpp on line 1016:
(unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0))
>From looking at the code and what it looks like it should be doing, I
cannot really tell whether it should use the 32-bit override, or if it
should use something like the long double override, considering this
is a 64-bit integer.
Either way, will not compile until a specific type override is given
of the form (just an example, I do not know if the 32-bit version is
what is wanted here):
(unsigned(abs((int)SInt)) < SSInt || (SInt % SSInt) != 0))
More information about the llvm-dev
mailing list