http://llvm.org/bugs/show_bug.cgi?id=16972

            Bug ID: 16972
           Summary: accepts-invalid if member is uninitialized when a
                    trivial constexpr copy constructor is called
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Clang accepts this:

struct S {
  constexpr S() : n(f(*this)) {}
  int n;
  static constexpr int f(S s) { return 0; }
};
void f() { constexpr S s; }

It should not: S's implicit copy constructor reads s.n while it is
uninitialized.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to