gcc/cp/
PR c++/51462
* semantics.c (cx_check_missing_mem_inits): Don't assert in case
of error.
gcc/testsuite/
PR c++/51462
* g++.dg/cpp0x/constexpr-99.C: New test.
From-SVN: r182806
+2012-01-02 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51462
+ * semantics.c (cx_check_missing_mem_inits): Don't assert in case
+ of error.
+
2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/20140
/* It's OK to skip a member with a trivial constexpr ctor.
A constexpr ctor that isn't trivial should have been
added in by now. */
- gcc_checking_assert (!TYPE_HAS_COMPLEX_DFLT (ftype));
+ gcc_checking_assert (!TYPE_HAS_COMPLEX_DFLT (ftype)
+ || errorcount != 0);
continue;
}
error ("uninitialized member %qD in %<constexpr%> constructor",
+2012-01-02 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51462
+ * g++.dg/cpp0x/constexpr-99.C: New test.
+
2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/20140
--- /dev/null
+// Origin PR c++/51462
+// { dg-options "-std=c++11" }
+
+struct A
+{
+ int i = 0;
+};
+
+struct B
+{
+ A a;
+ constexpr B() : a(0) {} // { dg-error "no matching function" }
+};