D
damian birchler
What's wrong about this:
22: static void (*)(void) instruction_table[] = {
jnz,
halt,
mv,
add,
mul,
mv_reg,
add_reg,
mul_reg,
pop,
push,
};
The compiler doesn't complain about wrong types of the functions, it says:
interpreter.c:22: syntax error before `)'
interpreter.c: In function `execute_instruction':
interpreter.c:66: `instruction_table' undeclared (first use in this function)
interpreter.c:66: (Each undeclared identifier is reported only once
interpreter.c:66: for each function it appears in.)
Thanks a lot
damian
22: static void (*)(void) instruction_table[] = {
jnz,
halt,
mv,
add,
mul,
mv_reg,
add_reg,
mul_reg,
pop,
push,
};
The compiler doesn't complain about wrong types of the functions, it says:
interpreter.c:22: syntax error before `)'
interpreter.c: In function `execute_instruction':
interpreter.c:66: `instruction_table' undeclared (first use in this function)
interpreter.c:66: (Each undeclared identifier is reported only once
interpreter.c:66: for each function it appears in.)
Thanks a lot
damian