aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr84705.C13
3 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 701ec64..f1541651 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84705
+ * init.c (build_cplus_new): Avoid duplicate diagnostic about
+ incomplete type, early return error_mark_node if the second
+ argument is error_mark_node.
+
2018-10-12 Nathan Sidwell <nathan@acm.org>
* parser.h (struct cp_parser): Drop implicit_extern_c.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6c1ba92..0f75b6d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84705
+ * g++.dg/cpp0x/pr84705.C: New.
+
2018-10-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56386
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr84705.C b/gcc/testsuite/g++.dg/cpp0x/pr84705.C
new file mode 100644
index 0000000..394e466
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr84705.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+int a[]{a}; // { dg-error "invalid conversion" }
+
+template<int>
+struct b {
+ __attribute__((c([] {
+ struct {
+ int a = static_cast<struct d>(a); // { dg-error "invalid use of incomplete type" }
+ } e;
+ })));
+};