If you do not specify -sync_stdio, the compiler sets it to -sync_stdio=yes.
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.
This option is only effective for linking of executables, not for libraries.