Oh yeah, the GNU C Compiler hates it, too:
int main() {
return 0; // sneaky
}
When I compile it:
🐸 gcc sneaky_semicolon.c
sneaky_semicolon.c: In function ‘main’:
sneaky_semicolon.c:2:10: warning: `0;' is not in NFC [-Wnormalized=]
2 | return 0;
| ^
sneaky_semicolon.c:2:10: error: invalid suffix ";" on integer constant
2 | return 0;
| ^~
sneaky_semicolon.c:2:12: error: expected ‘;’ before ‘}’ token
2 | return 0;
| ^
| ;
3 | }
| ~
The Tiny C Compiler also hates it, but it’s very vague in its error message:
🐸 tcc sneaky_semicolon.c
sneaky_semicolon.c:2: error: invalid number
It would take me a year to figure that one out, based on that error message.