Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Curious about function prototypes... Message-ID: <8073@brl-smoke.ARPA> Date: 11 Jun 88 09:12:18 GMT References: <654@orion.cf.uci.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <654@orion.cf.uci.edu> nagel@ics.uci.edu (Mark Nagel) writes: >A friend of mine who is installing the GNU C compiler here tells me that the >ANSI standard has changed this so that the function body header must look >like the function prototype. The GNU documentation says that something like >the above is now an error. It's not an error, so long as the argument types are what you would get from the default argument promotions (as they are in this case). However, it is not a good idea to mix new-style (prototype) and old-style function syntax. The proposed ANSI C provides rules for resolving the collision of these two ways of doing business, but that's intended for grandfathering in existing code, not to be used for new code. New code should consistently use prototype style for both declarations and definitions.