You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
On GCC, this gives:
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)The text was updated successfully, but these errors were encountered: