[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] "function pointer expected" error in valid ternary se
From: |
Henrik Nordstrom |
Subject: |
Re: [Tinycc-devel] "function pointer expected" error in valid ternary sequence |
Date: |
Thu, 17 Mar 2005 21:33:20 +0100 (CET) |
On Thu, 17 Mar 2005, Jason Davies wrote:
The following code fails to compile with the error, "function pointer
expected".
int main() {
int i = (1 == 0 ? foo : bar)();
}
Works better if you explicitly take the addresses of the functions.
int i = (1 == 0 ? &foo : &bar)();
but I also think both should be accepted.
Regards
Henrik