Reputation: 87
I have a very simple Hello World program, that doesn't have a return at the end of its main() function. If I understand correctly, this should throw a Wreturn-type warning, but when I compile it, no output at all is given. It simply compiles it and is done.
program:
#include <stdio.h>
int main() {
printf("Hello World!\n");
}
compilation commmand:
gcc -Wall -Wextra -o hello.o hello.c
I also tried specifically with the Wreturn-type
option.
On Manjaro 18.0.0 with GCC 8.2.1
Upvotes: 3
Views: 103