Re: Cast abuse
- From: Carlos Morgado <chbm chbm nu>
- To: balsa-list gnome org
- Subject: Re: Cast abuse
- Date: Mon, 19 Nov 2001 11:32:32 +0000
On 2001.11.19 11:18:21 +0000 Brian Stafford wrote:
> all a cast silences the compiler about potential coding errors. Also
> remember that void pointers eliminate the need for a lot of casts, e.g.
> code like "ptr = (int *) malloc(..." is always unnecessary since malloc
> returns a void *. Just write "ptr = malloc(...". The same goes for
is this C9x ? i certainly remember ansi/k&r compilers didn't allow for
automagic void * promotion
--
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
Software is like sex; it's better when it's free. - Linus Torvalds
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]