This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] for C++/52369
- From: Fabien Chêne <fabien dot chene at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 4 Apr 2014 10:09:04 +0200
- Subject: Re: [C++ patch] for C++/52369
- Authentication-results: sourceware.org; auth=none
- References: <CAFH4-diup6eH5j3MhZcknAAia+6ZSyzwD5D94WV0NMa+otgjFg at mail dot gmail dot com> <CAFH4-dgpyn56MQN-7bXM9teA9tBWSFYbcsjiAG5TT53YU04XjA at mail dot gmail dot com> <530F8315 dot 5010703 at redhat dot com> <CAFH4-dgj=JNDHuy2gaW0G9VcdwgrLMiGQg1JHuJHdB-Fcb2SQQ at mail dot gmail dot com> <5310FF29 dot 6060102 at redhat dot com> <CAFH4-diMgdJBTGV=fRZaESLhR4aGR_i8zyL1j99-sKD5eJRFQg at mail dot gmail dot com> <CAFH4-djUxkPYoThf-Gxhf-ZxFkPdEphHYprcDDhBtvHt3PC-6w at mail dot gmail dot com> <5313D7EB dot 8080801 at redhat dot com> <CAFH4-djGxznKjqbd96taMQoypJwvrGCTOkcso3aazD8-pz1-xQ at mail dot gmail dot com> <5330698D dot 5010107 at redhat dot com> <CAFH4-di3mpWOfpKONhH5z3r3-psD+osNi0s-FAw-X1KqN=aukA at mail dot gmail dot com> <5335AA6A dot 7030407 at redhat dot com> <CAFH4-div6q7MB9-BxppPZrqcCe0vXY9pL=8hp_c1vPCnHF9BLA at mail dot gmail dot com> <5339E290 dot 9030802 at redhat dot com> <CAFH4-dgHUTRj8vcKMWKSwvQwv91AWb4XXgnmBdnrss4MRWU60A at mail dot gmail dot com> <533C7591 dot 40906 at redhat dot com>
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
{