Bug#341345: gcc-4.0: Please warn on impossible conditionals

2005-11-30 Thread Falk Hueffner
Justin Pryzby [EMAIL PROTECTED] writes: Please consider also warning on things like: if (0==c 1==c) How would this be different from -Wunreachable-code? -- Falk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Bug#341345: gcc-4.0: Please warn on impossible conditionals

2005-11-29 Thread Justin Pryzby
Package: gcc-4.0 Version: 4.0.2-4 Severity: wishlist Tags: upstream gcc will warn on something like char c; // ... if (c256) { // warning: comparison is always false due to limited range of data type // ... } Please consider also warning on things like: if (0==c 1==c) -- To

Bug#341345: gcc-4.0: Please warn on impossible conditionals

2005-11-29 Thread Paul Harris
Hi Justin, see lower ... Justin Pryzby wrote: Package: gcc-4.0 Version: 4.0.2-4 Severity: wishlist Tags: upstream gcc will warn on something like char c; // ... if (c256) { // warning: comparison is always false due to limited range of data type // ... } Please consider also

Bug#341345: gcc-4.0: Please warn on impossible conditionals

2005-11-29 Thread Justin Pryzby
On Wed, Nov 30, 2005 at 01:26:50PM +0800, Paul Harris wrote: I would imagine this below: if (0==c 1==c) isn't a good idea, because it would break symmetry with custom operator==() behaviour. Okay, I'm no CPP guy though :) Is it a problem to warn in C, only? I know little about the