Implicit and perhaps even explicit casts from function pointer types to object pointer types during array initialization should ideally produce a warning message.
See also: Feature request #598
There apparently are more cases where the warning (most ports) / error (for large model on stm8) is missing. I just tried to compile
extern void *p; void f(void) { p = &f; } void *p = &f; void (*fp)(void); void g(void) { p = fp; }
Out of the three, p = fp is the only one on which I get the expected warning / error.
Philipp
This still applies as of [r16497], and might be related to [bugs:#3952].
Bugs: #3952 Commit: [r16497]
Log in to post a comment.
There apparently are more cases where the warning (most ports) / error (for large model on stm8) is missing. I just tried to compile
Out of the three, p = fp is the only one on which I get the expected warning / error.
Philipp
This still applies as of [r16497], and might be related to [bugs:#3952].
Related
Bugs: #3952
Commit: [r16497]