I encountered a wierd runtime error after compiling and running the following statement:
FuncCall(unsigned char casenum) { switch (casenum) { case 0x00: return 0x0100; default: return 0x1000; } }
U16 GetReturn; GetReturn = FuncCall(x);
FuncCall(unsigned char casenum) { switch (casenum) { case 0x00: return (0x0100); default: return (0x1000); } }
You didn't specify the return type of the function, yet "code compiled with no errors or warnings". Shouldn't it have given "warning C35: 'FuncCall': uses old-style declarator" ? Anyway, if you have doubts about the code generated by the compiler, why not check the disassembly? - mike