From: SourceForge.net <no...@so...> - 2003-10-06 07:49:54
|
Bugs item #818483, was opened at 2003-10-06 00:49 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=818483&group_id=599 Category: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Passing parameters when calling a function throuh a pointer Initial Comment: The code: // File eg.c int (* pFunction)(int); // Pointer to a function extern int g; void Function(int i) // The function to be called { g = g + i; } void Example(void) { // The asignement of the function pointer pFunction = Function; // The call that can be compiled but... what // about the parameter the function waits for? pFunction; // The desired call to a function through a // pointer that cannot be compiled pFunction(1); // Line 20 } // End of file Cannot be compiled with the command 'sdcc -c eg.c' because of 'too many parameters error' at line 20. I tried the 2.3.5 version. Snapshots Oct 3 2003 and Apr 21 2003. My email address: Joa...@ya... I hope this report can help to improve the already excellent sdcc. Thank you, Joan Martinez ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=818483&group_id=599 |