httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean gaudet <dgaudet-list-new-ht...@arctic.org>
Subject Re: Bug 6980
Date Mon, 26 Feb 2001 00:02:23 GMT
On Sun, 25 Feb 2001 TOKILEY@aol.com wrote:

> What is the real argument behing the whole typecasting
> thing, anyway? It works.

typecasting hides typing problems.  you can easily end up in situations
where you are truncating or extending integers without realising it.
it's much better to get the warning and fix the APIs (usually through
explicitly defining types of the appropriate size rather than relying on
assumptions of sizeof(int) == sizeof(long) or other such crud).

printf()/scanf() are more painful to fix ... and this is where Ben Laurie
can chime in and point out how C++ prototype overloading offers a much
better solution, and i'd agree :)

-dean


Mime
View raw message