Re: [cc65] function pointer to __fastcall__ function

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-02-21 21:36:39
Hi!

On Tue, Feb 21, 2012 at 05:41:40AM -0500, Greg King wrote:
> "fastcall" qualifies the function, not the pointer.  So, shouldn't it be
> placed outside the parentheses?

Yes, you are right. Older versions of the compiler required the programmer to
qualify the pointer as __fastcall__ because of en error in the parser. This
error has been corrected in the meantime, and because I didn't want to break
old code, both forms are currently accepted.

So

    void (__fastcall__ *load_func)(uint8_t, char **);

and

    void __fastcall__ (*load_func)(uint8_t, char **);

will both work, but the latter is the correct and preferred way to do it. The
former may be removed in some upcoming compiler version.

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 Tue Feb 21 21:36:54 2012

This archive was generated by hypermail 2.1.8 : 2012-02-21 21:36:57 CET