On Wed, Feb 3, 2016 at 11:43 AM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: pped. > > The nocast mod is dropped and lost in the function create_pointer(). > In the example above, "cputime_t *" has type : > unsigned long [nocast] [usertype] * > while &utime is just: > unsigned long * That is my point. Why does "&utime" get drop but "cputime_t *" does not? They both are pointer of a base type. They both create pointers. It seems to me the bug is sparse not treating this two case consistently. > So, for sparse and its extended notion of type, the type we get when > taking the address of a [variable of some] type X is not the same as > directly using a pointer to the type X. In C language type system, these two should be the same type. It is a bug in sparse if they are not. I would rather get that bug fixed. > Which is very fine, just that MOD_NOCAST is dropped while the example > shows that it should not. I think that is a separate issue weather MOD_NOCAST should be inherent from pointer base type. Same with MOD_STORAGE. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html