Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!im4u!rutgers!mcnc!rti!xyzzy!throopw From: throopw@xyzzy.UUCP (Wayne A. Throop) Newsgroups: comp.lang.c Subject: Re: char (*a)[] (was: Style [++i vs i++]) Message-ID: <210@xyzzy.UUCP> Date: Thu, 20-Aug-87 17:24:51 EDT Article-I.D.: xyzzy.210 Posted: Thu Aug 20 17:24:51 1987 Date-Received: Sat, 22-Aug-87 12:07:01 EDT References: <234@nvpna1.UUCP> <193@caeco.UUCP> Organization: Data General, RTP NC. Lines: 18 ) john@caeco.UUCP (John Rigby) ) About the program ) main(a) char (*a)[]; { a = 0; print("%x\n"); a++; print("%x\n");} ) [...] ) On my machine (Sun 3-260 running 3.2) both the compiler and lint give the ) same warning: ) warning: zero-length array element ) [...] Which makes sence since the size is zero. Well, no, not quite. The size is unknown, which is not the same thing as having size zero. A small nit, to be sure, but mine own. (On the other hand, it is a Good Thing to see that some instances of lint and/or other tools catch the thing and at least complain about it, however inaccurately.) -- The best book on programming for the layman is "Alice in Wonderland"; but that's because it's the best book on anything for the layman. --- Alan J. Perlis