Article View: comp.std.c
Article #3152Re: gcc and NULL function pointers.
From: Peter da Silva
Date: Wed, 19 Jun 1991 20:34
Date: Wed, 19 Jun 1991 20:34
17 lines
1451 bytes
1451 bytes
In article <16418@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
> In article <EE-B=O2@xds13.ferranti.com> 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 <stdio.h>.
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?"
Technical Details
Message-ID:
<MR0CV2H@xds13.ferranti.com>Path:
arc1-ca.pugleaf.net!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!peterReferences:
<1991Jun4.012914.25418@tkou02.enet.dec.com> <4641@inews.intel.com> <EE-B=O2@xds13.ferranti.com> <16418@smoke.brl.mil>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <MR0CV2H@xds13.ferranti.com> Date: 19 Jun 91 20:34:11 GMT References: <1991Jun4.012914.25418@tkou02.enet.dec.com> <4641@inews.intel.com> <EE-B=O2@xds13.ferranti.com> <16418@smoke.brl.mil> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 17