This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Function declaration in 2 or more files

If function has to be shared in two files. (or same question for varaibles also)
So what to do is declare it as extern in other file.

Now in two files this function has been used.
Now will it make any difference in code performance/size if I declare it in all files (20 other .c files) using extern keyword.

As according to this
c-faq.com/.../decldef.html.

I am thinking to place all function declaration in one file global.h & use it.

But my other files don't need that function. Using global.h made that function visible in those files also.

Now is there any code size/performance issues.

0