Bugs item #691252, was opened at 2003-02-22 17:27
Message generated for change (Settings changed) made by tecodev
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=691252&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: pic14 target
Group: unreproducable
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Scott Dattalo (sdattalo)
Summary: const char arrays initialised as 0.
Initial Comment:
Using sdcc 2.3.2, a const array such as the following:
const unsigned char foo[10] = {1, 2, 3, 4, 5, 6, 7, 8,
9, 10 };
ends up being compiled as all zeros. The problem seems
to be the
use of BYTE_IN_LONG in printIvalType() in pic/glue.c. If
BIG_ENDIAN, then when the value size is 1, only the top
byte is
stored in the array, which is always 0. I've changed
it to use
suitably defined BYTE_IN_CHAR and BYTE_IN_SHORT for the
appropriate data types. Works For Me(TM).
Chris Emerson
sdcc@...
----------------------------------------------------------------------
Comment By: Raphael Neider (tecodev)
Date: 2005-07-01 23:58
Message:
Logged In: YES
user_id=1115835
Works with SDCC 2.5.1 #1053. I will close this in less than
two years time if nobody disagrees ;-)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=691252&group_id=599
|