|
|
| Author |
Message |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 15 July 2008, 23:03 PM Post subject: Weird Anomaly in GCC |
|
|
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: | | 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. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 16 July 2008, 0:46 AM Post subject: Re: Weird Anomaly in GCC |
|
|
| mikep wrote: | The ZX1281n compile displays the warning: | Code: | | 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. |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 16 July 2008, 1:21 AM Post subject: |
|
|
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. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 16 July 2008, 2:12 AM Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|