Commit d4a69ff4 by Fabien Chêne

decl.c (duplicate_decls): Check for the return of permerror before emitting a note.

2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>

	* decl.c (duplicate_decls): Check for the return of permerror
	before emitting a note.


2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>

	* g++.old-deja/g++.robertl/eb121.C: Adjust.
	* g++.old-deja/g++.jason/overload21.C: Likewise.
	* g++.old-deja/g++.law/init5.C: Likewise.

From-SVN: r209071
parent 2d18d295
2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
* decl.c (duplicate_decls): Check for the return of permerror
before emitting a note.
2014-04-03 Nathan Sidwell <nathan@codesourcery.com> 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
* class.c (accessible_nvdtor_p): New. * class.c (accessible_nvdtor_p): New.
...@@ -66,9 +71,9 @@ ...@@ -66,9 +71,9 @@
2014-03-26 Fabien Chêne <fabien@gcc.gnu.org> 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/52369 PR c++/52369
* cp/method.c (walk_field_subobs): Improve the diagnostic * method.c (walk_field_subobs): Improve the diagnostic
locations for both REFERENCE_TYPEs and non-static const members. locations for both REFERENCE_TYPEs and non-static const members.
* cp/init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
instead of %qD to be consistent with the c++11 diagnostic. instead of %qD to be consistent with the c++11 diagnostic.
2014-03-25 Jason Merrill <jason@redhat.com> 2014-03-25 Jason Merrill <jason@redhat.com>
......
...@@ -1737,9 +1737,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) ...@@ -1737,9 +1737,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
if (permerror (input_location, if (permerror (input_location,
"default argument given for parameter " "default argument given for parameter "
"%d of %q#D", i, newdecl)) "%d of %q#D", i, newdecl))
permerror (DECL_SOURCE_LOCATION (olddecl), inform (DECL_SOURCE_LOCATION (olddecl),
"previous specification in %q#D here", "previous specification in %q#D here",
olddecl); olddecl);
} }
else else
{ {
......
2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
* g++.old-deja/g++.robertl/eb121.C: Adjust.
* g++.old-deja/g++.jason/overload21.C: Likewise.
* g++.old-deja/g++.law/init5.C: Likewise.
2014-04-03 Cong Hou <congh@google.com> 2014-04-03 Cong Hou <congh@google.com>
PR tree-optimization/60505 PR tree-optimization/60505
...@@ -22,7 +28,7 @@ ...@@ -22,7 +28,7 @@
PR ipa/60659 PR ipa/60659
* testsuite/g++.dg/torture/pr60659.C: New testcase. * testsuite/g++.dg/torture/pr60659.C: New testcase.
2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/60733 PR tree-optimization/60733
......
// { dg-do assemble } // { dg-do assemble }
struct X { struct X {
void f (int = 4, char = 'r'); // { dg-error "previous specification" } void f (int = 4, char = 'r'); // { dg-message "previous specification" }
void g (int = 4, char = 'r'); // { dg-message "previous specification" } void g (int = 4, char = 'r'); // { dg-message "previous specification" }
}; };
......
...@@ -11,8 +11,8 @@ extern int fred( int); ...@@ -11,8 +11,8 @@ extern int fred( int);
class X { class X {
public : public :
void f( int = fred( 0) ) ; // { dg-error "" } previous spec void f( int = fred( 0) ) ; // { dg-message "previous spec" }
} ; } ;
void X::f( int x = fred( 0) ) {// { dg-error "" } .* void X::f( int x = fred( 0) ) { // { dg-error "default argument" }
} }
...@@ -3,7 +3,7 @@ class A { ...@@ -3,7 +3,7 @@ class A {
private: private:
int i1_; int i1_;
public: public:
void f(int const i1 = 1); // { dg-error "previous specification" } void f(int const i1 = 1); // { dg-message "previous specification" }
}; };
void void
......
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