A
Allin Cottrell
Thomas Heinz wrote (in re. gcc compilation of this erroneous
program):
$ cat test.c
int f(int);
int f();
int f() {return 0;}
int main (void) { return 0; }
Interesting: that message does seem wrong, since there's no
inconsistency between lines 2 and 3, only between 1 and 3.
I'm cc'ing comp.lang.c.
Allin Cottrell.
program):
$ cat test.c
int f(int);
int f();
int f() {return 0;}
int main (void) { return 0; }
The only point which remains concerns the error statement for
the program ... which is:
test.c: In function »f«:
test.c:3: error: number of arguments doesn't match prototype
test.c:2: error: prototype declaration
Here, it would be nice if the prototype declaration (3rd line of
error statement) refers to the strictest declaration (in the
example line 1).
Interesting: that message does seem wrong, since there's no
inconsistency between lines 2 and 3, only between 1 and 3.
I'm cc'ing comp.lang.c.
Allin Cottrell.