Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/13/11 09:39
Read: times


 
#183744 - incorrect warning
Responding to: ???'s previous message
It seems SDCC generates an incorrect warning. It can detect the __using(1) during code generation as can be seen in the generated .asm file. If you leave out the __using it will switch to bank 0 before making the call. If you make the function pointer typedef __using(2) it will switch to bank 2. It is the isr function entry that issues the warning and does NOT save the selected register bank. If you do a direct call to a function __using(2) it will save bank 2 and issue no warning.

Fortunately when both the isr and the function pointer use the same bank it doesn't need to save the bank. So in your case it is safe to ignore the warning.

Feel free to post this as a bug in the tracker system.
https://sourcefor...unc=browse

List of 17 messages in thread
TopicAuthorDate
SDCC: function pointers in an ISR            01/01/70 00:00      
   Alternative            01/01/70 00:00      
      re: Alternative            01/01/70 00:00      
         Register bank 1            01/01/70 00:00      
            re: register bank 1            01/01/70 00:00      
               Using...            01/01/70 00:00      
               Lack of orthogonality            01/01/70 00:00      
                  incorrect warning            01/01/70 00:00      
                     re: incorrect warning            01/01/70 00:00      
                        not fixed yet            01/01/70 00:00      
                           re: not fixed yet            01/01/70 00:00      
                              Actel's answer.            01/01/70 00:00      
   warning            01/01/70 00:00      
   function pointers in SDCC            01/01/70 00:00      
   bug fixed!            01/01/70 00:00      
      Actel support            01/01/70 00:00      
         Still on the payroll            01/01/70 00:00      

Back to Subject List