Pascal --> C question

Rahul Dhesi dhesi at bsu-cs.UUCP
Mon Mar 14 00:45:07 AEST 1988


In article <12340 at brl-adm.ARPA> TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU writes:
>Actually, the only version of Pascal that I will use is VaxPascal under
>VMS (what's that?) because it has some [excellent] optimizations....
...
>Why can't popular C compilers do that?

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 */
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.lang.c mailing list