Re: CVS update: php3/functions
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: CVS update: php3/functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-2953@lists.php.net to get a copy of this message | ||
> It would raise a warning which should be verbose enough.
No, that's the trouble. It wouldn't. For example, take this silly
illustration:
int show(void) {
return 1;
}
int main(void) {
int a;
a = (int)show();
return(a);
}
Fine and dandy, right? The type cast there doesn't hurt anybody. While
this is true in this case, what happens when someone decides to change the
show() function definition to:
char *show(void) {
return malloc(5);
}
Making this change will not produce a warning because of the spurious type
cast in the main() function above and could thus hide a bug on us.
-Rasmus
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net