Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Pascal --> C question Message-ID: <7458@brl-smoke.ARPA> Date: 19 Mar 88 01:09:55 GMT References: <12340@brl-adm.ARPA> <2351@bsu-cs.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <2351@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: -Another interesting optimization done by a VMS compiler, that competing -vendors never thought of doing, is this. If your C program contains - fflush(stdout); -the VMS C compiler will optimize this into: - if (F$MODE == INTERACTIVE) /* if interactive run */ - fflush(stdout); - else - printf("\n"); /* if batch run */ Is this true? It's no wonder competing vendors didn't think of doing it, because it's wrong.