C
copx
C99 gave us the "inline" keyword and IIRC in standard C
(as opposed to certain propriety dialects) it is just a hint
for the compiler i.e. there is no guarantee that a function
declared "inline" will actually be inlined all the time.
Now, here is the problem, a certain C compiler when evoked
in ANSI C mode produces an error message when I put
pointers to "inline" functions in an array of function pointers.
The compiler actually inlines the function code in this case, never
putting the functions themselves in the resulting binary and
thus renders the pointers invalid.
Is that standard conforming behavior? I mean, is there a
rule that you are not allowed to use pointers to "inline" functions?
(as opposed to certain propriety dialects) it is just a hint
for the compiler i.e. there is no guarantee that a function
declared "inline" will actually be inlined all the time.
Now, here is the problem, a certain C compiler when evoked
in ANSI C mode produces an error message when I put
pointers to "inline" functions in an array of function pointers.
The compiler actually inlines the function code in this case, never
putting the functions themselves in the resulting binary and
thus renders the pointers invalid.
Is that standard conforming behavior? I mean, is there a
rule that you are not allowed to use pointers to "inline" functions?