Path: utzoo!mnetor!tmsoft!dptcdc!jarvis.csri.toronto.edu!rutgers!apple!voder!pyramid!ctnews!mitisft!kemnitz From: kemnitz@mitisft.Convergent.COM (Gregory Kemnitz) Newsgroups: comp.lang.c Subject: Who's got the ANSI (was Re: Misdeclaring "main") Message-ID: <796@mitisft.Convergent.COM> Date: 23 Jul 89 10:29:29 GMT References: <28398@beta.lanl.gov| <14020068@hpisod2.HP.COM> <2268@auspex.auspex.com> <220@tnl.UUCP> Reply-To: kemnitz@mitisft.UUCP (Greg Kemnitz) Organization: Unisys Network Computing Group, San Jose Lines: 44 In article <220@tnl.UUCP| gwollman@tnl.UUCP (Garrett A. Wollman) writes: |In article <2268@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: |> Nope. It turned out the problem was that he'd written something like: |> |> struct foobar { |> ... |> } <<<<<<<<<<<< |> main(argc, argv) |> int argc; |> char *argv[]; |> { |> ... |> |> The missing semicolon caused the "struct" declaration to get glued to |> the definition of "main"... This presumably changed the calling sequence of |> "main" in such a way as to scramble the incoming arguments. |> [. . .] | |It is, of course, obvious, that if we used ANS C-compatible function |prototypes, this sort of problem would never get past the compiling Most of the System V Unix world does not have acces to an ANSI C compiler!!! It would be nice if all the world was ANSI, but it won't be for several years. It'll take that long for purchases of new C compilers for larger machines to be justified to management (they cost thousands of dollars), or for them to tricle out in normal OS releases. Due to copyleft (see thread on comp.lang.c++) gcc cannot be used on production code. Therefore, K & R will remain the industry standard for the next few years. | [good reasons to use ANSI deleted] | |-GAWollman | |-- |"(-::-)" (Siamese twins) | "This is a public-access system, so I don't |gwollman@tnl.UUCP | know what the operator's opinions are." | ...uunet!uvm-gen!tnl!gwollman ----------------------------------+-------------------------------------- Greg Kemnitz | Software without hardware is an idea. kemnitz@Convergent.COM | Hardware without software is a space heater. | | --Unknown author