Advertisement

外部文件不支持隐式函数引用(warning: implicit function declaration missing)

阅读量:

摘要:隐函数指的是仅在特定的.c或.cpp源文件中进行声明,而未在对应的头文件中作出定义的函数。对于那些不属于当前文件的函数,则被称作隐世函数。

C语言隐式函数声明问题解析

今日在调用PostgreSQL源代码中的get_rel_name()函数过程中,误操作触发了隐式函数get_relation_name();从而引发

复制代码
 delrelation_record.c:70:16: warning: implicit declaration of function ‘get_relation_name’ [-Wimplicit-function-declaration]

    
    table_name = get_relation_name(relOid);
    
             ^~~~~~~~~~~~~~~~~
    
 delrelation_record.c:70:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    
    table_name = get_relation_name(relOid);
    
           ^
    
 delrelation_record.c:92:5: w

全部评论 (0)

还没有任何评论哟~