On Sat, Apr 16, 2005 at 02:43:18AM +0200, Michael Stefaniuc wrote:
> Christopher Li wrote:
> >On Fri, Apr 15, 2005 at 10:36:52AM +0200, Michael Stefaniuc wrote:
> >
> >>Christopher Li wrote:
> Yeah, it works now. But there is one thing that feels strange:
> Why is the declaration of the function pointer with empty parameter list 
> a correct ANSI function declaration
>   int (*oink)();
> but the initialization of the same function pointer is not?
>   int (*oink)() = NULL;

The ANSI C allow you declare abstraction function then make it more
detail.
e.g. void foo(); then void foo(void);

So sparse don't warn on the the first one. But once you make it 
a real instance, it need to have the full prototype.

That is what I guess.

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to