Open
Description
int foo;
void foo();
On GCC, this gives:
test.c:2:6: error: ‘foo’ redeclared as different kind of symbol
2 | void foo() {}
| ^~~
test.c:1:5: note: previous declaration of ‘foo’ with type ‘int’
1 | int foo;
| ^~~
cwj compiles the file without an error when it probably should error (it already errors if, say, the second declaration is char foo;
, so it seems easy to do this with a function redefinition too)
Metadata
Metadata
Assignees
Labels
No labels