On 06/06/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
Here's the error I'm getting:
sdotest.cpp: In static member function `static int
sdotest::conversiontest()': sdotest.cpp:1135: error: integer constant is too large for "long" type sdotest.cpp: In static member function `static int sdotest::maintest()': sdotest.cpp:2569: error: integer constant is too large for "long" type sdotest.cpp:2575: error: integer constant is too large for "long" type make[5]: *** [sdotest.o] Error 1 On line 1135, in the following statement: dor->setLong("long", 0xFFFFFFFFFFFF); the constant is too big for a long. Same problem on lines 2569 and 2575. I suggest adding an import <limits.h> and using LONG_MAX to be more portable.
I think there may be more to it. Looking at the block of code that contains 1135 we can see dor->setByte("byte",20); dor->setCharacter("character", 1000); dor->setShort("short", (short)12345678); dor->setInteger("integer", 87654321); dor->setLong("long", 0xFFFFFFFFFFFF); dor->setFloat("float", (float)12345.678); dor->setDouble("double", 1234567.891); Most of these are not boundary cases, so I wonder if the setting of "long" was expected to fit in 64 bits or maybe it is supposed to trigger a runtime overflow error as part of the test. Anyway, I'll look into it. As a minimum I'll raise a JIRA and make the change you suggest to fix the build error. Regards, Geoff.