From: SourceForge.net <no...@so...> - 2004-12-28 16:16:11
|
Bugs item #1091064, was opened at 2004-12-25 02:33 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1091064&group_id=599 Category: C-Front End Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Extern declaration of multi-dimensional arrays and structure Initial Comment: Hi guys, Problem in sdcc 2.4.7: Extern declaration of multi-dimensional arrays and structures: unsigned char key[4][MEM_KEY] extern unsigned char key[][]; // does not work extern unsigned char key[4][MEM_KEY]; //works struct eventData {unsigned char event; unsigned char target;}; struct eventData keyTimer[NUM_KEYTIMER]; extern struct eventData keyTimer[NUM_KEYTIMER]; // does not work Compiler produces no error message, but code doesn't work. Used no special command line parameters. Cannot send you more code, because it is very hardware-specific. The structure example worked in sdcc 2.4.0. Regards mat...@gm... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-12-28 08:16 Message: Logged In: NO Sorry, I cannot see where it goes wrong in the assembly. I attach a file, once compiled with version 2.4.0 and the same file compiled with 2.4.7. if that helps. I guess that it has to do with struct eventData keyTimer[NUM_KEYTIMER]; if I reduce the array size to 1 it works. mat...@gm... ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2004-12-27 02:00 Message: Logged In: YES user_id=888171 >>Compiler produces no error message, but code doesn't work. The code you presented cannot "work" as there are no instructions, only declarations. Please be a little more elaborant on what doesn't work. Can you see where it goes wrong in the assembly? If you can create a little example source and upload it here that would be even better. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1091064&group_id=599 |