From: paolo Date: Wed, 17 Oct 2018 07:32:15 +0000 (+0000) Subject: /cp X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=989d22ef0a27a5a0b466a81391a631e3ed1b16d1;p=thirdparty%2Fgcc.git /cp 2018-10-17 Paolo Carlini 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. /testsuite 2018-10-17 Paolo Carlini PR c++/84705 * g++.dg/cpp0x/pr84705.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265233 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 701ec64cc074..f1541651e3d5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2018-10-17 Paolo Carlini + + 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 * parser.h (struct cp_parser): Drop implicit_extern_c. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6c1ba929f733..0f75b6d97dcc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-10-17 Paolo Carlini + + PR c++/84705 + * g++.dg/cpp0x/pr84705.C: New. + 2018-10-17 Paul Thomas 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 000000000000..394e466b05d0 --- /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 +struct b { + __attribute__((c([] { + struct { + int a = static_cast(a); // { dg-error "invalid use of incomplete type" } + } e; + }))); +};