On Thu, Nov 09, 2023 at 06:21:05AM +0100, Luc Van Oostenryck wrote: > Such 'nocast' attribute already exists and seems to do more or less what > you would like: > See Sparse docs at https://sparse.docs.kernel.org/en/latest/annotations.html > : > nocast <https://sparse.docs.kernel.org/en/latest/annotations.html#nocast> > > This attribute is similar to bitwise but in a much weaker form. It warns > about explicit or implicit casting to different types. However, it doesn’t > warn about the mixing with other types and it easily gets lost: you can add > plain integers to __nocast integer types and the result will be plain > integers. Hmm, that's a little suboptimal. But still a lot better than nothing. I'll see what I can do with them. Thanks a lot!