Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.std.c Subject: Re: gcc and NULL function pointers. Message-ID: Date: 19 Jun 91 20:34:11 GMT References: <1991Jun4.012914.25418@tkou02.enet.dec.com> <4641@inews.intel.com> <16418@smoke.brl.mil> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 17 In article <16418@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: > In article peter@ficc.ferranti.com (Peter da Silva) writes: > > execl("/bin/sh", "sh", "-c", "echo", NULL); > >(which is a common idiom in UNIX source groups) ... > A common INCORRECT idiom! Oh, I know it's incorrect. It's also common enough that a compiler vendor on a system where 0 doesn't have the same size and bit pattern as (void *)0 would be foolish to #define NULL as 0 in . Yes, it's better that everyone write correct code. But be liberal with what you accept... after all, the person you're punishing with a B&D definition of NULL is your customer. -- Peter da Silva; Ferranti International Controls Corporation; +1 713 274 5180; Sugar Land, TX 77487-5012; `-_-' "Have you hugged your wolf, today?"