Article View: comp.std.c
Article #3174Re: gcc and NULL function pointers.
From: Doug Gwyn
Date: Sat, 22 Jun 1991 23:13
Date: Sat, 22 Jun 1991 23:13
12 lines
1141 bytes
1141 bytes
In article <1146.Jun2221.20.2291@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >I'm not sure what people are arguing here. Yes, programmers should >always cast NULL appropriately if they use it at all, because there >exist vendors which #define NULL 0. Yes, vendors should define NULL as >((char *) 0) or ((void *) 0), because there exist programmers who use >NULL without casting and it's better to detect such misuse. What's the >issue? The issue is that #defining NULL as ((void*)0) does NOT detect such misuse, nor does it adequately compensate for it in all cases. #defining NULL as ((char*)0) is simply wrong.
Technical Details
Message-ID:
<16506@smoke.brl.mil>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!rutgers!hsdndev!cmcl2!adm!smoke!gwynReferences:
<9752@cognos.UUCP> <25572@well.sf.ca.us> <1146.Jun2221.20.2291@kramden.acf.nyu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!rutgers!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: gcc and NULL function pointers. Message-ID: <16506@smoke.brl.mil> Date: 22 Jun 91 23:13:44 GMT References: <9752@cognos.UUCP> <25572@well.sf.ca.us> <1146.Jun2221.20.2291@kramden.acf.nyu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 12