From: SourceForge.net <no...@so...> - 2003-05-18 20:24:28
|
Bugs item #739553, was opened at 2003-05-18 13:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=739553&group_id=599 Category: C-Front End Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: function pointers Initial Comment: Reported by Steve Maddison: #if defined (SDCC_mcs51) # define REENTRANT reentrant #else # define REENTRANT #endif struct my_struct { int (*fn_ptr)(int) REENTRANT; }; int my_function( int parm ) REENTRANT { return parm; } void main( void ) { struct my_struct test; test.fn_ptr = my_function; (*test.fn_ptr) (99); test.fn_ptr (100); } Last line with mcs51: f.c:22: warning: Functions called via pointers must be 'reentrant' to take arguments with -mz80: f.c:22: error: too many parameters ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=739553&group_id=599 |