From: Sandeep D. <sa...@wi...> - 2001-10-28 16:48:18
|
Hi Johan, Will try to take a look @ this 2day. I also had a question .... I was looking thru the DS390 gen.c , it seems that the codegen only uses eight bits for stack computations even in stack10bit mode...we always seem to add zero to the higher order byte ... Sandeep > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Johan Knol > Sent: Sunday, October 28, 2001 8:42 AM > To: sdc...@li... > Subject: [sdcc-devel] structure problems > > > struct { > char *s; > } *mystruct; > > char * foo(void) { > mystruct->s="wie is daar?"; > return mystruct->s; > } > > So far, so good. But now: > > struct { > char *s; > } mystruct; > > char * foo(void) { > mystruct.s="wie is daar?"; > return mystruct.s; > } > > Big problem: mystruct.s gets only two bytes assigned (out of > the three for a > generic pointer). As in: > > struct { > char *s; > } mystruct={"wie is daar?"}; > > Anyone? > > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > |