From: <Mic...@t-...> - 2000-05-05 17:35:35
|
Sorry Sandeep, it seems not to be fixed. i have the latest version from cvs V2.2.1, got the update, make realclean ./configure make make install but no change. so i deleted the whole source and did a complete checkout and same procedure .. no. still there see my attachment.zip >sdcc co.c const unsigned int ui[] = { 0x1234 , 0x5678 }; const unsigned long ul[] = { 0x12345678 , 0x90ABCDEF }; void main(void){while(1);} now see co.lst : 003B 115 _ui: 003B 34 12 116 .byte #0x34,#0x12 003D 78 56 117 .byte #0x78,#0x56 003F 118 G$ul$0$0 == . 003F 119 _ul: 003F 78 56 34 12 120 .byte #0x78,#0x56,#0x34,#0x12 0043 EF CD AB 90 121 .byte #0xEF,#0xCD,#0xAB,#0x90 one is big-endian and the other one is smal-endian. so if this was fixed it must be there again, i have the current sources from cvs, all reloaded .. Greetings Michael ----- Original Message ----- From: "Sandeep Dutta" <san...@wi...> To: <sdc...@li...> Sent: Friday, May 05, 2000 6:15 PM Subject: RE: [sdcc-devel] BUG in CONST Table access > Michael, > > This bug has been fixed.. please get the latest version from CVS > > Sandeep > > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Michael > Schmitt > Sent: Friday, May 05, 2000 5:33 AM > To: SDCC-Developer > Subject: [sdcc-devel] BUG in CONST Table access > > > Hi Folks, > > this one made me loose my hairs ! > > i was trying to implement an CRC16-CCITT-V41, but i failed for hours. > > const unsigned int table[4] = { 0x1234 , 0x2345 , 0x3456 , 0x4567 }; > > main{ > printf("\n\r %04X %04X %04X %04X",table[0],table[1],table[2],table[3]); > } > > i would expect the following output : > > 0x1234 0x2345 0x3456 0x4567 > > but all i get is : > > 0x3412 0x4523 0x5634 0x6745 > > so high-byte and low-byte are SWAPed ! > > if i place such a table into my source, i would expect to read them back > regardless of big- or smal-endian ! > I have tryed my code with BC3.1 and it works, so i guess this is a bug. > Or do i do something wrong ? > the used SDCC V220 was build on April 12th, so it is not the release > version, but the release version does also show this. > > The sun is shining, > we have 28 degree celsius, > the sky is blue, > have a nice weekend ! > > -- > Dipl.-Ing. (FH) Michael Schmitt > Baumer Ident GmbH > Entwicklung / Development Department > Hertzstr. 10 > D-69469 Weinheim > Deutschland / Germany > Tel. +49 (0) 6201 9957 - 30 > Fax. +49 (0) 6201 9957 - 99 > E-Mail : msc...@ba... > Web: http://www.baumerident.com > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-devel > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-devel |