From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 9 Feb 2007 18:09:48 +0800 From: Lee Duhem To: 9fans@cse.psu.edu Subject: Re: [9fans] 8c's feature or bug? Message-ID: <20070209100948.GA4716@debian> References: <20070208180145.GA9556@debian> <303879102ad156602837e8affd4c74f0@terzarima.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <303879102ad156602837e8affd4c74f0@terzarima.net> User-Agent: Mutt/1.5.9i Topicbox-Message-UUID: 0f86e536-ead2-11e9-9d60-3106f5b1d025 On Thu, Feb 08, 2007 at 06:48:48PM +0000, Charles Forsyth wrote: > > I give prototypes of foo and foo1 before use and define them, maybe 8c > > just ignore these prototypes when it see the definitions. > > the prototypes are fine, but that one doesn't agree with the actual definition > because the rules require the old style declaration > void f(b) > char b; > {} > to be treated as if it were > void f(b) > int b; > {} > whereas > void f(char b) > {} > would be compatible with a prototype > void f(char); > > the diagnostic appears because it doesn't ignore the prototype > (if it ignored it, all would be fine) but is obliged to check it against the > actual definition which, according to the historical rules for that style of declaration, > does not match. > I see now, thank you. > if you find that all a little confusing, that's all the more reason to avoid the old style completely! > > for old code that i control, i invariably take the opportunity to update it. I can't control these codes. > 8c -w ... sometimes finds other problems in old code. > Yes, -w is very helpful. Lee