httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <>
Subject Re: cvs commit: apache/src mod_proxy.c (fwd)
Date Wed, 03 Jul 1996 21:52:46 GMT
In reply to Ben Laurie who said
> This is altogether too narrow a definition of correct behaviour. For example,
> an assignment of any pointer to or from a void * should not generate a warning,
> nor should, say, assigning a char to an int. None of these types match yet a
> compiler which warned about them would be broken.

void *, is specifically in the standard to allow conversion of pointer
types without any loss and char to int is also specifically listed
as being a lossless conversion hence no warnings for either case.

> It seems obvious to me that assignment from xxx * to const xxx * is harmless,
> and even desirable in many cases, and hence should not generate a warning.

This conversion is not explicitly listed in the standard as being
transparent and in my other mail I've shown cases where you'd want
to catch mistakes of this type since they signify coding errors.

  Paul Richards, Originative Solutions Ltd.
  Phone: 0370 462071 (Mobile), +44 1225 447500 (work)

View raw message