gcc and NULL function pointers.

Peter da Silva peter at ficc.ferranti.com
Sat Jun 15 05:29:11 AEST 1991


In article <4641 at inews.intel.com> bhoughto at 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?"



More information about the Comp.std.c mailing list