From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f79df321ef1d2c00 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-05-13 18:36:58 PST Path: sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ames!agate!cs.berkeley.edu!jtkohl From: jtkohl@cs.Berkeley.EDU (John T Kohl) Newsgroups: comp.sys.dec Subject: Re: Portability of programs Summary: Use function prototypes! Message-ID: Date: 14 May 92 05:30:05 GMT References: <1992May11.172813.1@aud2.aud.auc.dk> <1992May12.203645.25485@decuac.dec.com> <902@niktow.canisius.edu> <1992May13.181504.23140@decuac.dec.com> <1992May13.202838.3068@decvax.dec.com> Organization: University of California, Berkeley NNTP-Posting-Host: stinson.cs.berkeley.edu In-reply-to: evans@zk3.dec.com's message of Wed, 13 May 1992 20:28:38 GMT >Watch out for arguments to functions where the argument is not >explicitly declared (and typed). You should explicitly declare the >formal parameters to routines or their sizes may not match up with the >caller (default is "int" which truncates 64-bit addresses). If you're programming in C, there is no excuse for not using function prototypes. ANSI C with prototypes has been standardized 1989. As good programming practice, you should be using function protoypes on any new code you write. It would also be a good idea to add them to existing code (who knows what bugs you might find?). Presumably proper prototyping will help you DTRT for Alpha C compilers. -- John Kohl UC Berkeley CS grad student Member of the League for Programming Freedom--details: league@prep.ai.mit.edu (The above opinions are MINE. Don't put my words in somebody else's mouth!)