(Command-line option to suppress warning: -w-ccc)
Whenever the compiler encounters a constant comparison that (due to the nature of the value being compared) is always true or false, it issues this warning and evaluates the condition at compile time.
For example:
void proc(unsigned x){ if (x >= 0) /* always 'true' */ { ... } }
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|