Steve Kreyer wrote: > I have compiled the follwing code with the command ''gcc file.c'' > > ... > > Neither is it used in this piece of code, nor is it compiled into an > object file, > so in my opinion it should be optimized away by gcc. > So perhaps anybody can tell me whats wrong with my thought... First of all, if you just type "gcc file.c" then you have not enabled any optimization at all. You have to supply -O2 (or -Os, -O1, etc.) if you want the compiler to perform optimization, as the default is -O0. That aside, the function won't be eliminated until it's declared "static", as some other module could still call it. Brian