Re: [PATCH] OpenSSL vs GCC 4.2.0

2007-05-24 Thread Jack Lloyd
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

Re: [PATCH] OpenSSL vs GCC 4.2.0

2007-05-23 Thread Dr. Stephen Henson
On Tue, May 22, 2007, Peter Hartley wrote: > Hi there, > > Having just downloaded GCC 4.2.0 and discovered that it can't build > OpenSSL (not even in the snapshots AFAICT), I'd like to offer a possible > solution. > > The earlier thread on openssl-dev explains that OpenSSL chooses to cast > the

Re: [PATCH] OpenSSL vs GCC 4.2.0

2007-05-23 Thread Peter Hartley
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 al

Re: [PATCH] OpenSSL vs GCC 4.2.0

2007-05-22 Thread Dr. Stephen Henson
On Tue, May 22, 2007, Peter Hartley wrote: > Hi there, > > Having just downloaded GCC 4.2.0 and discovered that it can't build > OpenSSL (not even in the snapshots AFAICT), I'd like to offer a possible > solution. > > The earlier thread on openssl-dev explains that OpenSSL chooses to cast > the

[PATCH] OpenSSL vs GCC 4.2.0

2007-05-22 Thread Peter Hartley
Hi there, Having just downloaded GCC 4.2.0 and discovered that it can't build OpenSSL (not even in the snapshots AFAICT), I'd like to offer a possible solution. The earlier thread on openssl-dev explains that OpenSSL chooses to cast the function pointers, not the parameters, to achieve type-safet