https://stackoverflow.com/questions/43423803/document-classification-tool-in-c-compilation-error/43432470#43432470文檔分類工具 - 在嵌套函數/範圍編譯錯誤(可以是)
在上述鏈路 我加入-fnested_functions作爲
GCC -c ./rainbow後得到3個錯誤。 ç-fnested函數process_wv.c test_file.c test_hdb_file.c
(3檔process_wv,test_file裏面,test_hdb_file從rainbow.c移除和現在加入作爲單獨的.c文件的目錄)
輸出: -
./bow/libbow.h:1345:8: note: forward declaration of 'struct argp_child'
struct argp_child; /* forward declare this type */
^
./rainbow.c:655:5: error: function definition is not allowed here
{
^
./rainbow.c:663:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif VPC_ONLY
^
//
./rainbow.c:734:3: warning: implicit declaration of function 'do_indexing' is invalid in C99
[-Wimplicit-function-declaration]
do_indexing();
^
./rainbow.c:1175:49: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between
pointers to integer types with different sign [-Wpointer-sign]
newsockfd = accept(rainbow_sockfd, &cli_addr, &clilen);
^~~~~~~
/usr/include/sys/socket.h:681:69: note: passing argument to parameter here
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
^
./rainbow.c:1586:30: error: use of undeclared identifier 'test_file'
bow_map_filenames_from_dir (test_file.c, 0, dir, "");
^
PS爲什麼test_file.c不明(在docnames.c bow_map_filenames_from_dir)在rainbow.c即使它們是相同的弓20020213文件夾內(權限是755所有)
問候