🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3140

Re: gcc and NULL function pointers.

#3140
From: Peter da Silva
Date: Fri, 14 Jun 1991 19:29
16 lines
1218 bytes
In article <4641@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes:
> Old chesnuts crack hard...

> The most general, and therefore most valuable, way to define NULL is
> to simply map it to the digit 0.

And you're working at Intel... On an 80x86 (x<3), there exist models where
int = 16 bits, pointer = 32 bits. On such a machine,

	execl("/bin/sh", "sh", "-c", "echo", NULL);

(which is a common idiom in UNIX source groups) will display amazing
things, assuming you don't get a core dump...
-- 
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: <EE-B=O2@xds13.ferranti.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter
References: <16386@ganymede.inmos.co.uk> <1991Jun4.012914.25418@tkou02.enet.dec.com> <4641@inews.intel.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!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: <EE-B=O2@xds13.ferranti.com>
Date: 14 Jun 91 19:29:11 GMT
References: <16386@ganymede.inmos.co.uk> <1991Jun4.012914.25418@tkou02.enet.dec.com> <4641@inews.intel.com>
Reply-To: peter@ficc.ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
Lines: 16