On Wed, 2007-05-23 at 03:07 +0200, Dr. Stephen Henson wrote:
> On Tue, May 22, 2007, Peter Hartley wrote:
> > So how about using expressions of the form
> > (void*)(1 ? x : ((T*)NULL))
> > instead?
>
> Would the compiler (or possibly other compilers) give out a warning that a
> test was always true?
Well, it's possible I suppose, but compilers I've seen tend to only warn
where it looks like a test is "accidentally" true: unsigned >= 0, that
sort of thing. You can't make the always-trueness of a test any more
deliberate and intentional-looking than by writing "1".
Peter
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]