This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ patch] for C++/52369


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.


-- 
Fabien
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
 		      {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]