extern declaration and function definition both in the same file

前端 未结 5 1807
没有蜡笔的小新
没有蜡笔的小新 2021-02-20 09:08

I was just browsing through gcc source files. In gcc.c, I found something like

extern int main (int, char **);

int
main (int argc, cha         


        
5条回答
  •  感情败类
    2021-02-20 09:39

    Functions are implicitly extern in C. Including extern is just a visual reminder. Side note, to make a function not extern you can use the static keyword.

提交回复
热议问题