From: Paolo Carlini Date: Fri, 17 Jun 2016 19:10:35 +0000 (+0000) Subject: decl.c (grokfndecl): Change pair of errors to error + inform. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf54f1234fed3a9968d2ff0425c1a5470d93367b;p=gcc.git decl.c (grokfndecl): Change pair of errors to error + inform. /cp 2016-06-17 Paolo Carlini * decl.c (grokfndecl): Change pair of errors to error + inform. /testsuite 2016-06-17 Paolo Carlini * g++.dg/cpp0x/defaulted31.C: Adjust for dg-message vs dg-error. From-SVN: r237562 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6b5258efa9f..e15b1760f8e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2016-06-17 Paolo Carlini + + * decl.c (grokfndecl): Change pair of errors to error + inform. + 2016-06-17 Jason Merrill PR c++/71209 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 830b3f523dc..59abd15cf29 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8295,7 +8295,8 @@ grokfndecl (tree ctype, else if (DECL_DEFAULTED_FN (old_decl)) { error ("definition of explicitly-defaulted %q+D", decl); - error ("%q+#D explicitly defaulted here", old_decl); + inform (DECL_SOURCE_LOCATION (old_decl), + "%q#D explicitly defaulted here", old_decl); return NULL_TREE; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 17bff0ec7c1..cb950cd5c5f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-06-17 Paolo Carlini + + * g++.dg/cpp0x/defaulted31.C: Adjust for dg-message vs dg-error. + 2016-06-17 Christophe Lyon * lib/target-supports.exp diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted31.C b/gcc/testsuite/g++.dg/cpp0x/defaulted31.C index 2ac28baf902..947364440d1 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted31.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted31.C @@ -4,7 +4,7 @@ struct A { A() { } // { dg-message "defined" } - ~A() = default; // { dg-error "defaulted" } + ~A() = default; // { dg-message "defaulted" } }; A::A() = default; // { dg-error "redefinition" }