3 ms·
Compiles with only a warning: #include <stdio.h> int main() { int x = 5; int y = &x; FILE *f = x * y; fputs("hello", f); }
by xigoi 3y ago
Compiles with only a warning:
#include <stdio.h>
int main() {
int x = 5;
int y = &x;
FILE *f = x * y;
fputs("hello", f);
}
- lelanthran 3y agoSo what are you complaining about? That the compiler told you "Don't do that" but you ignored it? I mean, you said: >> Knowing the type of everything won’t save you but the compiler is trying to save you! You have to actively work against it in order to hang yourself, and you blame the language?