I have a struct
the value field is a quite multipurpose one (depending on type). one of the purposes I want to use is to store a function's address.Code:typedef struct { uint8_t type; uint8_t num; uint8_t id; int value; }EXPR;
The only way I found to do it
But how can I invoke the function?Code:EXPR expr; int(*fp)(void); fp = Foo; expr.value = (int)fp;
With the "proper" pointer I could do
the question - can I inform a compiler that value is a function's address?Code:result = fp();