LINUX.ORG.RU

История изменений

Исправление kim-roader, (текущая версия) :

$ gcc -std=c89 test.c
$ gcc -std=c89 test.c -Wall
test.c: In function ‘main’:
test.c:6:3: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
   usleep(1000000);
   ^
test.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
$ man gcc
...
       -Wimplicit-function-declaration (C and Objective-C only)
           Give a warning whenever a function is used before being declared. In C99 mode (-std=c99
           or -std=gnu99), this warning is enabled by default and it is made into an error by
           -pedantic-errors. This warning is also enabled by -Wall.
...

Исходная версия kim-roader, :

$ gcc -std=c89 test.c
$ gcc -std=c89 test.c -Wall
test.c: In function ‘main’:
test.c:6:3: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
   usleep(1000000);
   ^
test.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
$ man gcc
...
       -Wimplicit-function-declaration (C and Objective-C only)
           Give a warning whenever a function is used before being declared. In C99 mode (-std=c99 or -std=gnu99), this warning is enabled by default and it is made into an error by -pedantic-errors. This warning is also enabled by -Wall.
...