Re: sparse: ARRAY_SIZE and sparse array initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 30, 2014 at 9:48 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> But then when we look up a symbol, we only look at the latest one, so
> when we size the array, we look at that "extern" declaration, and
> don't see the size that was created with the initializer.

Exactly. Sparse need to handle merging of incremental type declare.
This is a long known sparse bug.

>
> I'll think about how to fix it cleanly. Expect a patch shortly.

Wow, cool. I want to mention one special case of the type merging.
It has some thing to do with scoping as well. When the scope ends,
the incremental type added inside the scope will need to strip away
as well. So it can not be blindly add to the original type without consider
how to take that layer away later.

This should be very exciting. Looking forward to the patch.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux