#2 TestSuite build error on Intel OSX Leopard (32bit)

closed-fixed
nobody
None
5
2010-11-16
2010-11-16
Mike Enright
No

$ make -j4
g++ main.cpp TestAssign.cpp TestChildren.cpp \ TestComments.cpp TestConverters.cpp TestCtors.cpp \ TestEquality.cpp TestFunctions.cpp TestInequality.cpp \ TestInspectors.cpp TestIterators.cpp TestMutex.cpp \ TestNamespace.cpp TestRefCounting.cpp TestSuite.cpp \ TestWriter.cpp UnitTest.cpp \ ../Source/internalJSONNode.cpp ../Source/JSON_Base64.cpp \ ../Source/JSONChildren.cpp ../Source/JSONDebug.cpp \ ../Source/JSONIterators.cpp ../Source/JSONMemory.cpp \ ../Source/JSONNode_Mutex.cpp ../Source/JSONNode.cpp \ ../Source/JSONWorker.cpp ../Source/JSONWriter.cpp \ ../Source/libJSON.cpp \ -Wfatal-errors -O3 -ffast-math -fexpensive-optimizations -o testapp
TestConverters.cpp:31: error: integer constant is too large for ‘long’ type
compilation terminated due to -Wfatal-errors.
make: *** [single] Error 1

The offending line is:
assertEquals(NumberToString::_itoa<long>(9223372036854775807L), JSON_TEXT("9223372036854775807"));

Intel OSX is using 8 bytes for a 'long' so 9223372036854775807L should be cool I would think.

Thoughts?

I'll keep digging.

Discussion

  • Fixed, I just wrapped some preprocessor around it. This test is now not on, but I will still be testing it internally.

    This will be fixed in the next release which will hopefully be tomorrow or the next day.

    Thank you for being vigilant, and please report any other bugs you may find.
    Jon

     
    • status: open --> closed-fixed