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