Xref: utzoo comp.sys.amiga.programmer:602 comp.std.c:4249 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!caen!sol.ctr.columbia.edu!emory!gatech!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.sys.amiga.programmer,comp.std.c Subject: Re: ANSI prototypes, the right choice... Message-ID: <15089@smoke.brl.mil> Date: 5 Feb 91 20:16:00 GMT References: <7708@sugar.hackercorp.com> Followup-To: comp.sys.amiga.programmer Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 16 In article <7708@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes: > int foo(int a, int b); >This is *not* compatible with a function declared: > int foo(a, b) > int a, b; > { > } >While some compilers will accept this declaration while this prototype is >in scope, it is not portable and should at least generate a warning. No, this is perfectly okay. If Lattice C has a problem with it, it is a bug in Lattice C. There ARE function interfaces where the "old style" definition would not be compatible with a prototype using the same types, but only when default argument promotions change the type, which is not the case for int.