Linus Torvalds wrote: > 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? See my response to Christopher later in the thread; his revised patch appears to solve the problem fully. > 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? Christopher's revised patch does exactly that. - Josh Triplett