Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ll-xn!cullvax!drw From: drw@cullvax.UUCP (Dale Worley) Newsgroups: comp.lang.c Subject: char (*a)[] (was: Style [++i vs i++]) Message-ID: <1459@cullvax.UUCP> Date: Thu, 13-Aug-87 11:25:35 EDT Article-I.D.: cullvax.1459 Posted: Thu Aug 13 11:25:35 1987 Date-Received: Sat, 15-Aug-87 09:06:27 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 17 strouckn@nvpna1.UUCP (Louis Stroucken 42720) writes: # >> > main(a) # >> > char (*a)[]; # [ discussion wether "a++;" should do something sensible ] # Please note that "a" is a formal argument of main!! # The declaration of "a" might as well read "char **a;". "a++;" should # increment "a" with sizeof( char * ) bytes. And so, Louis is the only one to notice that Lint passes this code, *because it is correct* (as far as static analysis goes)! Now, let's make the declaration local, rather than a parameter, and try again... Dale (hey, I missed it too!) -- Dale Worley Cullinet Software ARPA: cullvax!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw OS/2: Yesterday's software tomorrow Nuclear war? There goes my career!