Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!kithrup!sef From: sef@kithrup.COM (Sean Eric Fagan) Newsgroups: comp.std.c Subject: Re: gcc and NULL function pointers. Message-ID: <1991Jun10.081924.26439@kithrup.COM> Date: 10 Jun 91 08:19:24 GMT Article-I.D.: kithrup.1991Jun10.081924.26439 References: <4641@inews.intel.com> <1991Jun10.061202.25199@kithrup.COM> <1991Jun10.073125.25120@tkou02.enet.dec.com> Organization: Kithrup Enterprises, Ltd. Lines: 18 In article <1991Jun10.073125.25120@tkou02.enet.dec.com> diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) writes: >Yes indeed, the best way to implement a processor for the language does not >handle the case where a programmer doesn't know how to use the language. >So what? ANSI does not require a prototype for non-variardic functions (as far as I can tell). As a result, for a certain class of popular machines, under certain compiler options, defining NULL as 0 will be incorrect, while '(void*)0' is correct. And the program that would core-dump on this would be perfectly correct, according to ANSI. The header file would, therefore, be wrong. -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.