From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <303879102ad156602837e8affd4c74f0@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] 8c's feature or bug? From: Charles Forsyth Date: Thu, 8 Feb 2007 18:48:48 +0000 In-Reply-To: <20070208180145.GA9556@debian> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 0f3e13ec-ead2-11e9-9d60-3106f5b1d025 > 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. 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. 8c -w ... sometimes finds other problems in old code.