We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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); } }
Did you check what affect this had on the assembly code produced?
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