From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 9 Feb 2007 02:01:45 +0800 From: Lee Duhem To: 9fans@cse.psu.edu Subject: Re: [9fans] 8c's feature or bug? Message-ID: <20070208180145.GA9556@debian> References: <20070208172808.GA9111@debian> <19c957c9b96a78a95e0c7fb973fd89a8@terzarima.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19c957c9b96a78a95e0c7fb973fd89a8@terzarima.net> User-Agent: Mutt/1.5.9i Topicbox-Message-UUID: 0f02ee98-ead2-11e9-9d60-3106f5b1d025 On Thu, Feb 08, 2007 at 05:33:32PM +0000, Charles Forsyth wrote: > you're mixing ANSI prototypes and the original style, and > in > void f(b) > char b; > > i suspect b is promoted to int, because before prototypes C compilers > didn't know an argument was a char at point of call, and chars were promoted to int (similarly float to double), > and the function with the argument so promoted clashes with the earlier void f(char). > I give prototypes of foo and foo1 before use and define them, maybe 8c just ignore these prototypes when it see the definitions. > in any case, if you're going to use 8c at all, just commit to ANSI prototypes. > in fact, even if you're not going to use 8c, just use ANSI prototypes and either way, > avoid or eliminate the ARGS crud. > > surely it must be at least 20 years old. > > if the code is imported i suppose it doesn't matter, but if it's new code, > using ARGS or __PROTO or whatever is usually just silly. It's old code, anyway. Lee