$ cat 5929711.c
static void A() {
A(1, 2, 3);
}
void main() {
A();
}
$ gcc 5929711.c
$ gcc -std=c89 5929711.c
$ gcc -std=c89 -pedantic 5929711.c
5929711.c:5:6: warning: return type of ‘main’ is not ‘int’
$ gcc -std=c89 -pedantic -Wall 5929711.c
5929711.c:5:6: warning: return type of ‘main’ is not ‘int’
$ gcc -std=c89 -pedantic -Wall -Wextra 5929711.c
5929711.c:5:6: warning: return type of ‘main’ is not ‘int’
$ gcc -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes 5929711.c
5929711.c:1:13: warning: function declaration isn’t a prototype
5929711.c:5:6: warning: function declaration isn’t a prototype
5929711.c:5:6: warning: return type of ‘main’ is not ‘int’
$ gc89 5929711.cc
c1: warnings being treated as errors
5929711.c:1:13: error: function declaration isn’t a prototype
5929711.c: In function ‘A’:
5929711.c:1:13: error: old-style function definition
5929711.c: At top level:
5929711.c:5:6: error: function declaration isn’t a prototype
5929711.c:5:6: error: return type of ‘main’ is not ‘int’
5929711.c: In function ‘main’:
5929711.c:5:6: error: old-style function definition
--------------------------------
$ alias gc89
alias gc89='/usr/bin/gcc -std=c89 \
-pedantic \
-Wall \
-Wextra \
-Wno-missing-field-initializers \
-Wformat=2 \
-Wswitch-default \
-Wswitch-enum \
-Wcast-align \
-Wpointer-arith \
-Wbad-function-cast \
-Wstrict-overflow=5 \
-Wstrict-prototypes \
-Winline \
-Wundef \
-Wnested-externs \
-Wcast-qual \
-Wshadow \
-Wunreachable-code \
-Wlogical-op \
-Wfloat-equal \
-Wstrict-aliasing=2 \
-Wold-style-definition \
-Werror \
-ggdb3 \
-O0 \
-fno-omit-frame-pointer \
-ffloat-store \
-fno-common \
-fstrict-aliasing \
-lm'