[gnu.g++.bug] strange behavior with stdio in g++ 1.27

schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") (11/12/88)

Hi,

   I'm not sure if this is a g++ bug or a libg++ bug, or a sparc bug,
but in any case, the following program doesn't print anything out
to the screen.  However, if a newline is added, then the line is printed
out.  This is g++ 1.27, running on a sun 4.

----------------------------------------
#include <stdio.h>

void foo ( char *buf ) {
   while ( *buf ) {
      printf ( "%c",*buf );
      buf++;
   }
}

main () {
   foo ( "this line won't print!" );
}
----------------------------------------

thanks,

Doug