以下の C プログラムをコンパイルすると、次の警告が表示されます
‘noreturn’ function does return
。これは機能です:
void hello(void){
int i;
i=1;
}
なぜそれが起こっているのでしょうか?この関数へのすべての呼び出しはhello();
編集:完全なエラー出力:
home.c: In function ‘hello’:
hhme.c:838:7: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]
home.c:840:1: error: ‘noreturn’ function does return [-Werror]
cc1: all warnings being treated as errors
make: *** [home.o] Error 1