On Wed, May 23, 2007 at 03:07:30AM +0200, Dr. Stephen Henson wrote:

> Would the compiler (or possibly other compilers) give out a warning that a
> test was always true?

Unlikely, that would set off code like:

#define DEBUG 1

[...]

if(DEBUG)
  printf("some debug info");

Which isn't perhaps the best style but a lot of code does get written
like this under the assumption the compiler will detect the trueness
or non-trueness of the expression at compile time and not emit any
code for it. (It also has the advantage that your debug-specific code
will be typechecked, etc, in every build regardless of the value of
DEBUG, unlike the code in an '#if DEBUG' block).

-Jack
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to