On Mon, 12 Feb 2007, Christopher Li wrote:
>
> On Mon, Feb 12, 2007 at 10:28:19AM -0800, Linus Torvalds wrote:
> >
> > (It is perfectly proper to have a typedef that is actually of a function
> > type, so this looks like a sparse bug regardless, it looks just as if we
> > don't turn a function type into a function pointer type when we see it as
> > an argument in the declaration).
>
> Yes, we does, in examine_fn_arguments(). But not correctly inherent the
> attribute bits.
Ahh.
> I think this patch should fix it, I haven't try it myself on this bug yet.
> It works on a different test case "function vs function ptr".
> It has been posted to the list before. It is in my series as well.
This looks good. Ack. Josh?
The only thing that I reacted to is that maybe we should change the
s->ctype.modifiers = 0;
a few lines down into a
s->ctype.modifiers &= ~MOD_PTRINHERIT;
or something? Although the normal "create_pointer()" function just leaves
it entirely alone. So I don't know what the correct thing to do is. I
wonder why I did that in the first place (that code is _old_).
Linus
-
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