Subject: Re: CVS commit: src/usr.bin/xlint/lint1
To: None <source-changes@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: source-changes
Date: 10/18/2006 16:29:24
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 on
implicit int promotion.

-- 
Christian