Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Misdeclaring "main" (was: Re: system 5 vrs. bsd4.3 question) Message-ID: <10588@smoke.BRL.MIL> Date: 23 Jul 89 10:21:41 GMT References: <28398@beta.lanl.gov> <14020068@hpisod2.HP.COM> <2268@auspex.auspex.com> <220@tnl.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <220@tnl.UUCP> gwollman@tnl.UUCP (Garrett A. Wollman) writes: -Actually, the whole business of prototyping saves me a considerable -amount of debugging time. This allows me to catch errors such as -passing a char to a function which takes an int, when the char was -supposed to be unsigned. (Don't think this is a problem? Try writing -to a file, using fputc('\xff',fp). The '\xff' will be sign-extended to --1.) I don't understand your example: '\xff' is an int, fputc() takes an int. How is the use of prototypes going to help here? Indeed, why is your compiler compiling '\xff' as -1?