From: Fabien Chêne Date: Fri, 4 Apr 2014 08:03:19 +0000 (+0200) Subject: decl.c (duplicate_decls): Check for the return of permerror before emitting a note. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4a69ff4cc73c73c6bb9fe85c08f245f8e7e8f18;p=gcc.git decl.c (duplicate_decls): Check for the return of permerror before emitting a note. 2014-04-04 Fabien Chêne * decl.c (duplicate_decls): Check for the return of permerror before emitting a note. 2014-04-04 Fabien Chêne * 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d174767edd7..a5756541696 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-04-04 Fabien Chêne + + * decl.c (duplicate_decls): Check for the return of permerror + before emitting a note. + 2014-04-03 Nathan Sidwell * class.c (accessible_nvdtor_p): New. @@ -66,9 +71,9 @@ 2014-03-26 Fabien Chêne 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. - * 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. 2014-03-25 Jason Merrill diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f3a081b8a8f..f1743dd74dc 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1737,9 +1737,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (permerror (input_location, "default argument given for parameter " "%d of %q#D", i, newdecl)) - permerror (DECL_SOURCE_LOCATION (olddecl), - "previous specification in %q#D here", - olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous specification in %q#D here", + olddecl); } else { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d470b1e6b35..0446485dfb8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-04-04 Fabien Chêne + + * 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 PR tree-optimization/60505 @@ -22,7 +28,7 @@ PR ipa/60659 * testsuite/g++.dg/torture/pr60659.C: New testcase. - + 2014-04-02 Bill Schmidt PR tree-optimization/60733 diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C index 72397930367..125aee0dbfc 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C @@ -1,6 +1,6 @@ // { dg-do assemble } 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" } }; diff --git a/gcc/testsuite/g++.old-deja/g++.law/init5.C b/gcc/testsuite/g++.old-deja/g++.law/init5.C index c1d647b1b05..7ed89e21924 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/init5.C +++ b/gcc/testsuite/g++.old-deja/g++.law/init5.C @@ -11,8 +11,8 @@ extern int fred( int); class X { 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" } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C index e01d7478838..036c8d5152a 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C @@ -3,7 +3,7 @@ class A { private: int i1_; public: - void f(int const i1 = 1); // { dg-error "previous specification" } + void f(int const i1 = 1); // { dg-message "previous specification" } }; void