Commit bf54f123 by Paolo Carlini Committed by Paolo Carlini

decl.c (grokfndecl): Change pair of errors to error + inform.

/cp
2016-06-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokfndecl): Change pair of errors to error + inform.

/testsuite
2016-06-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp0x/defaulted31.C: Adjust for dg-message vs dg-error.

From-SVN: r237562
parent 3ebacabd
2016-06-17 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokfndecl): Change pair of errors to error + inform.
2016-06-17 Jason Merrill <jason@redhat.com> 2016-06-17 Jason Merrill <jason@redhat.com>
PR c++/71209 PR c++/71209
......
...@@ -8295,7 +8295,8 @@ grokfndecl (tree ctype, ...@@ -8295,7 +8295,8 @@ grokfndecl (tree ctype,
else if (DECL_DEFAULTED_FN (old_decl)) else if (DECL_DEFAULTED_FN (old_decl))
{ {
error ("definition of explicitly-defaulted %q+D", 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; return NULL_TREE;
} }
......
2016-06-17 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp0x/defaulted31.C: Adjust for dg-message vs dg-error.
2016-06-17 Christophe Lyon <christophe.lyon@linaro.org> 2016-06-17 Christophe Lyon <christophe.lyon@linaro.org>
* lib/target-supports.exp * lib/target-supports.exp
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
struct A struct A
{ {
A() { } // { dg-message "defined" } A() { } // { dg-message "defined" }
~A() = default; // { dg-error "defaulted" } ~A() = default; // { dg-message "defaulted" }
}; };
A::A() = default; // { dg-error "redefinition" } A::A() = default; // { dg-error "redefinition" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment