Page 1 of 1

Weird Anomaly in GCC

Posted: 15 July 2008, 16:03 PM
by mikep
I have exactly the same code compiled first with ZX24n and then with a ZX1281n. I have verbose output and keep files turned on.

The ZX1281n compile displays the warning:

Code: Select all

warning: cast from pointer to integer of different size
whenever stringTbl[] is referenced. The output C source file and GCC command invocations are the same apart from the device name. Most people will not see this problem and it doesn't affect the execution to my knowledge.

Re: Weird Anomaly in GCC

Posted: 15 July 2008, 17:46 PM
by dkinzer
mikep wrote:The ZX1281n compile displays the warning:

Code: Select all

warning:cast from pointer to integer of different size
whenever stringTbl[] is referenced.
That was fixed in the updated zxlib.h that I posted a few days ago.

The reason that it is different for the two devices is the fact that a Flash address is a 32-bit value internally on devices with more than 64K of Flash and a 16-bit value otherwise.

Posted: 15 July 2008, 18:21 PM
by mikep
Ok that fixed it. It was news to me that a new compiler and zxlib.h existed. The download page still shows 2.5.3.

BTW the zxlib.h is commented as 2.5.3 instead of 2.5.4. This file is normally shipped with the zxlib package and not the compiler although I see why it is required.

Posted: 15 July 2008, 19:12 PM
by dkinzer
mikep wrote:It was news to me that a new compiler and zxlib.h existed. The download page still shows 2.5.3.
The only "announcement" was in Paul's ISR post where it was described as an experimental (read "not fully tested") version.
mikep wrote:This file is normally shipped with the zxlib package and not the compiler although I see why it is required.
That is true. However, inasmuch as both elements were required and it was an experimental release, it seemed simpler to package them together.