Sun Studio 12: C++ User's Guide

A.2.90.1 Defaults:

If you do not specify -sync_stdio, the compiler sets it to -sync_stdio=yes.

Examples:

Consider the following example:


#include <stdio.h>
#include <iostream>
int main()
{
   std::cout << "Hello ";
   printf("beautiful ");
   std::cout << "world!";
   printf("\n");
}

With synchronization, the program prints on a line by itself


Hello beautiful world!
:

Without synchronization, the output gets scrambled.

Warnings:

This option is only effective for linking of executables, not for libraries.