Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!prls!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: comp.lang.c Subject: Re: char (*a)[] (was: Style [++i vs i++]) Message-ID: <2310@mmintl.UUCP> Date: Fri, 14-Aug-87 20:27:22 EDT Article-I.D.: mmintl.2310 Posted: Fri Aug 14 20:27:22 1987 Date-Received: Thu, 20-Aug-87 04:50:13 EDT References: <8298@brl-adm.ARPA> <587@cblpe.ATT.COM> <189@xyzzy.UUCP> <1987Aug10.192923.7879@sq.uucp> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT. Lines: 21 In article <1987Aug10.192923.7879@sq.uucp> msb@sq.UUCP (Mark Brader) writes: >Wayne Throop writes: >>... but *also* because it performs arithmetic on a null pointer, and >>of course, this is illegal.) > >Um, I don't think so, Wayne; it's just that the result, if you indirect >through such a pointer, is undefined. Operations which produce undefined results are a special case of illegal operations. Specifically, they are illegal operations where the response of the program can be anything. Including, at the extremes, aborting with an error message, or performing in some well-defined way as an implementation extension. On the other hand, I don't know of any programs (ala lint) which perform flow analysis on C programs, and nothing less will detect this kind of bug. Lint certainly cannot be expected to find it. -- Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108