From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@ccil.org (John Cowan) Date: Wed, 31 Aug 2016 10:37:03 -0400 Subject: [TUHS] Comments on "C" In-Reply-To: <01a901d2038c$157e4ff0$407aefd0$@ronnatalie.com> References: <20160829031619.GB48170@eureka.lemis.com> <15EAA199-2C57-4621-A71E-95E046086BB5@tfeb.org> <01a901d2038c$157e4ff0$407aefd0$@ronnatalie.com> Message-ID: On Wed, Aug 31, 2016 at 9:32 AM, Ron Natalie wrote: > The null pointer constant does not need a cast on ANY architecture . Well, it's a matter of what counts as "need". People normally expect execl("/bin/sh", "sh", "-c", "date", NULL) to work, but it will not on systems that define NULL as 0 and have different sizes of integers and pointers (or, Ghu forbid, null pointers that are not all-bits-0). The man page is careful to warn against this practice, but it is commonplace anyhow, and on such architectures, defining NULL as (void *)0 will protect users against this situation. -- John Cowan http://www.ccil.org/~cowan cowan at ccil.org Clear? Huh! Why a four-year-old child could understand this report. Run out and find me a four-year-old child. I can't make head or tail out of it. --Rufus T. Firefly on government reports -------------- next part -------------- An HTML attachment was scrubbed... URL: