Package version | GCC version | Results of tests |
2006q1 - 6 | 4.1.0 | Even in simple code, a compilation error with "internal compiler error" message. Recommendation: do not attempt to use it. |
2007q1 - 26 | 4.2.0 | After making necessary changes to the SDK, the compilation runs well. HelloWorldBasic can be built and run on device (both Debug and Release modes) |
2007q3 - 52 | 4.2.1 | Not tested. Should behave similarly to 4.2.0 and 4.2.3. |
2008q1 - 126 | 4.2.3 | After making necessary changes to the SDK, compilation runs well. HelloWorldBasic can be built and run on device (both Debug and Release modes). This version has been tested on a very large project (over 100,000 lines of code): some changes were necessary, but overall it seemed to work. |
2008q3 – 67 | 4.3.2 | After making necessary changes to the SDK, the compilation runs well. Linker problems with missing "_Unwind_GetTextRelBase". Recommendation: stick to 4.2.3, if possible. |
- #include <e32debug.h>
- ...
- void tryDivision ()
- {
- TInt a, b, c;
- a = 10;
- b = 5;
- c = a / b;
- RDebug::Printf("Result of division is %d",c);
- }
- // This code was suggested by Julian Brown from CodeSourcery. It is in public domain.
- // Many thanks!
- #if __GCCE__
- #if __SERIES60_30__
- extern unsigned int __aeabi_uidivmod(unsigned numerator, unsigned denominator);
- int __aeabi_idiv(int numerator, int denominator)
- {
- int neg_result = (numerator ^ denominator) & 0x80000000;
- int result = __aeabi_uidivmod ((numerator < 0) ? -numerator : numerator, (denominator < 0) ? -denominator : denominator);
- return neg_result ? -result : result;
- }
- unsigned __aeabi_uidiv(unsigned numerator, unsigned denominator)
- {
- return __aeabi_uidivmod (numerator, denominator);
- }
- #endif // __SERIES60_30__
- #endif // __GCCE__