Paulo Matos <[EMAIL PROTECTED]> wrote:
> 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?You could try g++ -O3 -S on your code to see what the compiler produces. And yes, there is no call to foo. Andre' _______________________________________________ help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
