07-27-2023, 12:16 PM
So, given the following code:
int main(void) {
int i;
i = 12.1234;
i++;
return 0;
}
I compiled the code and I expected and wanted the compiler to give me a warning, but it didn't. Is my compiler configured wrong? Is there a way to make my compiler give warning?
This is what I used
>cc -Wall test.c
int main(void) {
int i;
i = 12.1234;
i++;
return 0;
}
I compiled the code and I expected and wanted the compiler to give me a warning, but it didn't. Is my compiler configured wrong? Is there a way to make my compiler give warning?
This is what I used
>cc -Wall test.c