Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: Anonymous 2011-07-20 4:17

I'm sick of seeing the children here posting about their lisps and their pythons and what not.

Let's have a thread for a manly programming language for men like C.

Name: Anonymous 2011-07-20 11:17

I like writing reusable code, and I have a question about the use of modules (different files) in c.

I consider it bad practice, because when declaring an extern function (which is the default) the compiler can't remove it if it isn't used in a particular implementation.

So instead i put stuff in header files and declare the functions static. That way the compiler are free to inline, and remove them as it wishes.

So, how do you guys deal with this? Use the preprocessor?
Is there some magic optimization option in gcc so i don't have to do this?

Newer Posts