gcc and NULL function pointers.

Peter da Silva peter at ficc.ferranti.com
Tue Jun 25 04:04:09 AEST 1991


In article <25572 at well.sf.ca.us> Jef Poskanzer <jef at well.sf.ca.us> writes:
> Hey, I've got an idea: how about not using NULL?  Using a 0 explicitly
> cast to the appropriate pointer type works perfectly for all machines
> and compilers.  Furthermore, it makes the code more self-documenting
> and maintainable, and less error-prone.

Agreed 100%.

For me, at least, I've never been talking about how one should write code.
There is no question but that this is the best coding practice (for myself,
I often use "nil(type)", defined as "((type)0)", which can't be easily
abused).
-- 
Peter da Silva; Ferranti International Controls Corporation; +1 713 274 5180;
Sugar Land, TX  77487-5012;         `-_-' "Have you hugged your wolf, today?"



More information about the Comp.std.c mailing list