From: SourceForge.net <no...@so...> - 2011-09-16 16:49:08
|
Bugs item #3410620, was opened at 2011-09-16 09:49 Message generated for change (Tracker Item Submitted) made by andypeters You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3410620&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: C-Front End Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andy Peters (andypeters) Assigned to: Nobody/Anonymous (nobody) Summary: warning 139 Initial Comment: sdcc issues the above warning when an ISR calls a function through a function pointer. Assume: #define INTREGBANK 1 typedef void (*phandler_t)(void); // add a __using(INTREGBANK) here does not matter phandler_t phandlers[8]; void Int0_isr(void) __interrupt(0) __using(INTREGBANK) { unsigned char intsrc; intsrc = GetInterruptSource; phandlers[intsrc](); // warning refers to this line } // Int0_isr This results in a warning: ..main.c:150: warning 139: call via function pointer in ISR using non-zero register bank. Cannot determine which register bank to save. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3410620&group_id=599 |