Path: utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: null pointers of type JOKE* can't be dereferenced Message-ID: <11441@smoke.BRL.MIL> Date: 30 Oct 89 13:57:17 GMT References: <11380@smoke.BRL.MIL> <8952@goofy.megatest.UUCP> <872.254895b5@csc.anu.oz> <11432@smoke.BRL.MIL> <876.2549cbb7@csc.anu.oz> <879.254a0ba0@csc.anu.oz> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 22 In article <879.254a0ba0@csc.anu.oz> bdm659@csc.anu.oz writes: >problems earlier drafts had concerning pointer comparison have been fixed. >In summary, the BEST answer to the question >"does (int*)0 != (int*)0 really follow from the two sentences I quoted?" is >"who cares? the standard doesn't say that any more." There is another point worth making here. The Standard must be subjected to more than mere "linguistic analysis" in order to understand what it is saying; there is a gestalt that must be acquired, and it goes beyond the simple expansion of words in terms of their definitions, just as concepts in general embody much more than is found in their literal definitions. For instance, although "(int*)0" does indeed have type "pointer to int", it does not point to an int. Moreover, no pointer of type "void*" points to any datum having type "void"; there are no void objects in C as specified by the Standard (despite arguments from some of us that there should be). Yet simple elaboration of "pointer to X" might mislead one to think that such a thing points to X. These technical terms are used in subtly tricky ways, and must be understood in the total context of the language specification.