diff mbox

[C++] for C++/52369

Message ID CAFH4-diMp-GodkvbjmUbn+x-4WJVfPx41T97ZBmE6QAabrNWeA@mail.gmail.com
State New
Headers show

Commit Message

Fabien Chêne April 4, 2014, 8:09 a.m. UTC
2014-04-02 22:39 GMT+02:00 Jason Merrill <jason@redhat.com>:
> On 04/02/2014 04:21 PM, Fabien Chêne wrote:
>>
>>      * cp/decl.c (duplicate_decls): Check for the return of
>>      permerror before emitting a note.
>
>
> You don't need "cp/" within cp/ChangeLog.  OK with that change.

I was a bit too optimistic, old-deja needs to be adjusted.
I've commited the following testsuite adjustments as obvious.

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.

Comments

Mike Stump April 6, 2014, 3:53 p.m. UTC | #1
On Apr 4, 2014, at 1:09 AM, Fabien Chêne <fabien.chene@gmail.com> wrote:
> I was a bit too optimistic, old-deja needs to be adjusted.

Thanks.
diff mbox

Patch

Index: gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.robertl/eb121.C	(révision 208997)
+++ gcc/testsuite/g++.old-deja/g++.robertl/eb121.C	(copie de travail)
@@ -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
Index: gcc/testsuite/g++.old-deja/g++.jason/overload21.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.jason/overload21.C	(révision 208997)
+++ gcc/testsuite/g++.old-deja/g++.jason/overload21.C	(copie de travail)
@@ -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" } 
 };
 
Index: gcc/testsuite/g++.old-deja/g++.law/init5.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.law/init5.C	(révision 208997)
+++ gcc/testsuite/g++.old-deja/g++.law/init5.C	(copie de travail)
@@ -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" }
 }
Index: gcc/cp/decl.c
===================================================================
--- gcc/cp/decl.c	(révision 208997)
+++ gcc/cp/decl.c	(copie de travail)
@@ -1737,9 +1737,9 @@  duplicate_decls (tree newdecl, tree oldd
 			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
 		      {