Re: [cc65] function ptr error with head

From: Johan Kotlinski <kotlinski1gmail.com>
Date: 2009-09-01 14:38:51
Ah! I didn't know that C differed from C++ here. Sorry :*)

Cheers
Johan


On Tue, Sep 1, 2009 at 2:26 PM, Marc 'BlackJack' Rintsch<marc@rintsch.de> wrote:
> Johan Kotlinski wrote:
>> Trying to compile this:
>>
>> void bar() {}
>>
>> main()
>> {
>>     typedef void (*FOO)(void);
>>     FOO foo;
>>     foo = bar;
>> }
>>
>> ...gives:
>>
>> test.c(7): Error: Incompatible pointer types
>
> Isn't that correct as `void bar()` != `void bar(void)`?
>
> Ciao,
>        Marc 'BlackJack' Rintsch
>
>
----------------------------------------------------------------------
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 Sep 1 15:07:08 2009

This archive was generated by hypermail 2.1.8 : 2009-09-01 15:07:10 CEST