https://bugzilla.novell.com/show_bug.cgi?id=805007 https://bugzilla.novell.com/show_bug.cgi?id=805007#c0 Summary: OS: SLES: std::cout failed to print char out when there's no endl at the end Classification: openSUSE Product: openSUSE 11.4 Version: RC 1 Platform: PowerPC OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: nanzhang.chai@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0 Sample src code to reproduce the problem: <a.C> #include <iostream> using namespace std; main() { cout << 'A'; /* no endl here */ return(0); } </a.C> Compile a.C and run it on a SLES11 SP2 machine, we got nothing print out. <---- wrong behavior <a.ksh> g++ -o a a.C ./a </a.ksh> But if we add endl to cout: <b.C> #include <iostream> using namespace std; main() { cout << 'A' << endl; /* endl added here */ return(0); } </b.C> Then compile and run on same SLES12 SP2 machine, we got expected output. <b.ksh> g++ -o b b.C ./b </b.ksh> Output: A Looks to me cout should be able to print out the stream no matter with endl or not. Also I don't see endl stated as a must-have for cout in the documentation. Could you please take a look? Please feel free to contact me if any question. Thanks, Reproducible: Always Steps to Reproduce: <a.C> #include <iostream> using namespace std; main() { cout << 'A'; /* no endl here */ return(0); } </a.C> Compile a.C and run it on a SLES11 SP2 machine, we got nothing print out. <---- wrong behavior <a.ksh> g++ -o a a.C ./a </a.ksh> Actual Results: No char printed out. Expected Results: even without endl, char should still be printed out. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.