On Mon, Mar 31, 2014 at 1:06 AM, Hans Verkuil <hverk...@xs4all.nl> wrote:
>
> Running sparse over this gives:
>
> error: bad integer constant expression

So technically sparse is correct in this case. The kernel ends up
doing some questionable things that gcc allows. The index in an
assignment initializer is supposed to be a true constant expression,
not "constant expression after simplification and optimization".

So sparse warns about us playing games that just happen to work with
gcc. I'm not sure we should fix sparse for this case.

I'll think about it, but not right now (I did the previous one because
it was trivial, but now I'm in merge window mode, so I'd better go
back and look at kernel pull requests)

Chris, can you please add this to the test cases since Hans did the
work to create a nice small test-case?

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

Reply via email to