On Oct 18, 2006, at 7:29 AM, Christian Biere wrote:
Jason Thorpe wrote:modify lint to issue a warning about a constant that is being cast to a type when the constant would have already fit into that type's range.I hope you really mean that as a special purpose tool only. Such warnings would cause false-positives complaining about casts that are absolutely necessary e.g. "(uint64_t) 1 << x". Also casting char to signed or unsigned char is sometimes necessary too for portability reasons as char maybe signed or not which would cause implementation-dependent behaviour if relying onimplicit int promotion.
I mean as arguments to functions.
-- Christian
-- thorpej