https://llvm.org/bugs/show_bug.cgi?id=28954

            Bug ID: 28954
           Summary: basic streams may not be initialized early enough
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This is a bug that https://reviews.llvm.org/D12689 attempted to address.

The C++11 standard (Section 27.4.1.2) requires that basic streams be
initialized as if an inclusion of <iostream> statically defined an instance of
std::ios_base::Init.

The example given in the changelist:

#include <iostream>

class Foo {
public:
  Foo(int n) {
    std::cout << "Hello World - " << n << std::endl;
  }
};

Foo f(5);

int main() {
  return 0;
}

With the head version of libc++, this program may crash.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to