Hi Linus, On 16 March 2017 at 17:25, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > On Sat, Mar 11, 2017 at 7:47 AM, Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: >> This is a RFC for giving a type to constants/PSEUDO_VALs. > > Linearization has fundamentally gotten rid of all the C types, and all > you can find are some rough remnants of them (you can find the *size* > of the type, and you can find the rough "type" of type - is it a > pointer, FP value or integer. There aren't even any signs, although > some _operations_ are signed (but not the pseudos). > I think that having the size and information whether an integer constant is an integer or pointer should be good enough, but as far as I understood for pseudos of type PSEUDO_VAL even this is not available. Only the value is available. This poses a problem especially when passing arguments to a variadic function. In sparse-llvm I think we need to cast values to their expected types to keep LLVM happy. From my investigations so far this works most of the time but the corner case appears to be passing integer/pointer constants to variadic functions. In the normal case we can use the function prototype to work out the required types. Is it possible to at least retain size / and kind (int or pointer) for pseudos representing integer constants? Perhaps the RFC could be amended to say that? Thanks and Regards Dibyendu -- 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