From: Patrick G. <P. GEHRIGER> - 2001-08-30 13:54:15
|
Dear SDCC-Team! Is this a compiler error? In my project, when I compile my single source file containing something like #define myfoo (72u) /* many other things */ void myfunc(void) { unsigned char my_local_var= myfoo; /* more C code */ } the output produced runs well on my target hardware. If I only convert the line with the #define into a global variable declaration: unsigned char myfoo = 72u; then the target crashes and does NOT run well. No warnings nor errors were produced while compiling/linking either source. The assembler code of both versions looks, at first glance, plausible (I mean at the place in myfunc where my_local_var is assigned myfoo). What could the cause be? Would you like to have the assembler outputs? Greetings, Patrick -- * * * Patrick GEHRIGER Elektronik und Software Karlstr. 95 DE-64285 DARMSTADT Tel, Fax: +49 6151 22093 mailto:p.g...@ma... |