On Thu, 2007-05-17 at 15:27 -0700, Andrew Morton wrote:
> Lovely.  So it was actually generating wrong code on all
> sizeof(size_t)!=sizeof(int) architectures.

I was trying to work out which architectures would actually be affected.
Probably not many. If it's in a register it probably doesn't matter --
the size only matters if you put it on the stack. And it would have to
be a 64-bit architecture, none of which (iirc) are so register-starved
that this particular argument would be on the stack anyway.

So I'm not actually sure it will really generate wrong code on any
architecture we support -- not that this excuses it in any way :)

> If only we could find some way in which all callers of a function as
> well as its definition can see the same declaration? 

Well, building with --combine helps. :)

Admittedly it doesn't necessarily catch _all_ callers -- only those
which we actually compile together. That does cover _most_ of the times
we do crap like this without a prototype in a header file though, I
suspect.

As Geert points out, sparse can warn about non-static functions which
aren't prototyped; if we start getting anal about that, it might help.

-- 
dwmw2

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

Reply via email to