On 05/20/11 22:10, James Carlson wrote: > As for whether it has any effect on -g, I don't know. I can't imagine > that any competent compiler implementation would have trouble generating > proper code for that construct, but I guess I don't have a good > imagination for bad compilers ... >
A lot of compilers will turn off all optimizations when -g is used. Others will turn off some opts. It was not that long ago that you were not allowed to use -O and -g at the same time. Clearly using the -g option in this case turns off the compile time optimizations that remove the bogus function call. This makes sense because the point of -g is to force the compiler to retain as much as possible the correspondence between the source code and the generated assembly code so the developer can debug it in a sane manner. -- blu Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding -----------------------------------------------------------------------| Brian Utterback - Solaris RPE, Oracle Corporation. Ph:603-262-3916, Em:[email protected] _______________________________________________ networking-discuss mailing list [email protected]
