Re: [PHP4BETA] cvs: php4 /ext/standard/ levenshtein.c
[email protected] (Sascha Schumann)
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 23 May 2000, Hartmut Holzgraefe wrote: > Zeev Suraski wrote: > > The problem with the 'dirty trick' is that sizeof(void *) isn't necessarily > > equal to sizeof(int). On many platforms it isn't. > > sure, i know that, but chances that a long is smaler than a pointer are > not > that bad,i even thought about protecting it with an assert() instead of > doing it right in the first place, stupid me ... There is no guarantee that casting a pointer to long and casting the result to a pointer will yield the original pointer. That means the code must not rely on this assumption, or it is considered broken. > but i never thought of this as a _compile_ time problem ... :( GCC is not the right tool for testing source code on conformance to existing standards. Most other compilers are stricter in one or another way. > PS: seems that cvs.php.net doesn't know about my new address > ([email protected] instead of [email protected]) > could somebody change this or tell me where to ... ? I've changed it. - Sascha