From: SourceForge.net <no...@so...> - 2003-03-12 12:44:19
|
Bugs item #697590, was opened at 2003-03-04 22:50 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=697590&group_id=599 Category: C-Front End >Group: fixed >Status: Closed Resolution: None Priority: 5 Submitted By: Bernhard Held (bernhardheld) >Assigned to: Johan Knol (johanknol) Summary: function pointer inside a structure Initial Comment: Reported by Yigal Hochberg <hoc...@dm...> warning: Functions called via pointers must be 'reentrant' to take arguments typedef int (Funcptr_t)(int x, int y, char *z) reentrant; /* function pointer type */ struct abc { Funcptr_t *funcptr; }; void foo(int a, int (*func_ptr)(int x, int y, char *z) reentrant, /* function pointer */ int b) { a = 5; b = 5; (*func_ptr)(a, b, "hello"); } void foo1(int a, Funcptr_t *func_ptr, int b) { struct abc myabc; a = 5; b = 5; (*func_ptr)(a, b, "hello"); (*myabc.funcptr)(a, b,"hello"); /* sdcc does not like it */ } ---------------------------------------------------------------------- >Comment By: Johan Knol (johanknol) Date: 2003-03-12 12:55 Message: Logged In: YES user_id=63512 fixed in src/SDCC.y:1.62 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=697590&group_id=599 |