On Sun, Aug 3, 2008 at 8:19 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:
Thanks Rene. Plz discard my earlier msg as I didn't get question then. Yes it's the case with the fuctions. Just a small detail. They aren't interchangeable. "&function_designator" cannot be used in place of "function_designator". Correct me if I am wrong.
-
Rahul.
--
Smart data structures and dumb code works a lot better than the other way
around. -Eric S Raymond
On Sun, Aug 3, 2008 at 7:36 PM, Rene Herman <rene.herman@xxxxxxxxxxxx> wrote:
>>
>>
>> How does this work ? :-( ....... Isn't gcc supposed to catch this and
>> flag warning unless I am missing something very obvious.
>
> In C, except as an operand of sizeof or unary &, an _expression_ having
> function type is automatically converted from function type to pointer to
> function.
>
> Or put differently: except for sizeof and unary &, "function_designator" and
> "&function_designator" are interchangeable as expressions.
Thanks Rene. Plz discard my earlier msg as I didn't get question then. Yes it's the case with the fuctions. Just a small detail. They aren't interchangeable. "&function_designator" cannot be used in place of "function_designator". Correct me if I am wrong.
-
Rahul.
--
Smart data structures and dumb code works a lot better than the other way
around. -Eric S Raymond