Re: [cc65] function pointer, fastcall

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2008-08-16 18:04:34
Hi!

On Sat, Aug 16, 2008 at 01:30:10PM +0200, Stefan wrote:
> Ok, sorry i thought so because not all compilers support fastcall as a
> calling convention.
          
The problem wasn't the fastcall calling convention but the missing parenthesis
around the "*". You need a pointer to something, so you need to add "*". But
the parenthesis in a function bind tighter than the "*", so

        char *f(char);

is actually a function returning char*, not a pointer to a function returning
char. Using parens

        char (*f)(char);

you have a pointer to a function taking char and returning char. Now just add
fastcall

        char fastcall (*f)(char);

and you have a pointer to a fastcall function.
    
Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Aug 16 18:06:40 2008

This archive was generated by hypermail 2.1.8 : 2008-08-16 18:06:42 CEST