Hi all,

Can g++ optimize an (almost) empty function such as
ostream& foo(ostream& o) { return o; }

int main(void) {

   foo(cerr);

   return 0:
}

will g++ make the call to foo?

Problem is I'm strugling to find a way to insert debugging info without
messing around with Macros too much. So I would define foo with a body
if DEBUG is defined during compile time and remove the body if DEBUG is
not defined. However, one of my priorities is not to have debugging
code during release builds since this is a batch application and a lot
of debugging output will surely delay it a lot!

Suggestions would be great!

Regards,

Paulo Matos

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to