From patchwork Fri Apr 4 08:09:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fabien_Ch=C3=AAne?= X-Patchwork-Id: 336871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0A5B2140081 for ; Fri, 4 Apr 2014 19:09:15 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=SM7wL3oGjnDS8c028m TW0y0ICI5DvMPWH17GtOMwMb1GFJoQ9R35BrgUvYYtIzODwYZB/o6YNcSl61qIYc RKbK/mZ/AmX2Nhr/jqsQMvSnIdIjKXcTMRqbk2MRBswkJCt/D5+Dk6pg/sL6YT4k IP6mT6MFCMHOtWiojOMGLpFRQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=DRVcPW1ohY135pRg14xQRTbu dBk=; b=gEXn/H6qC885BewcC29f1S7qAFn62K+Ufv6SDoRJPUR6G7seAKg5ly0g 6ZfETM2PC3oYMgmHp7EUO+dUlFhJM0mZ7G0yazIwn6O9YXmbkCY8BYa/1AYu3MQb shpsm3rNe9/XVlqxtOEdAfS/gZrBobiqur89lVbJzKSk/0qu21Q= Received: (qmail 24105 invoked by alias); 4 Apr 2014 08:09:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24095 invoked by uid 89); 4 Apr 2014 08:09:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f178.google.com Received: from mail-vc0-f178.google.com (HELO mail-vc0-f178.google.com) (209.85.220.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 04 Apr 2014 08:09:06 +0000 Received: by mail-vc0-f178.google.com with SMTP id im17so2907657vcb.9 for ; Fri, 04 Apr 2014 01:09:04 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.52.23.97 with SMTP id l1mr10162435vdf.11.1396598944538; Fri, 04 Apr 2014 01:09:04 -0700 (PDT) Received: by 10.52.103.105 with HTTP; Fri, 4 Apr 2014 01:09:04 -0700 (PDT) In-Reply-To: <533C7591.40906@redhat.com> References: <530F8315.5010703@redhat.com> <5310FF29.6060102@redhat.com> <5313D7EB.8080801@redhat.com> <5330698D.5010107@redhat.com> <5335AA6A.7030407@redhat.com> <5339E290.9030802@redhat.com> <533C7591.40906@redhat.com> Date: Fri, 4 Apr 2014 10:09:04 +0200 Message-ID: Subject: Re: [C++ patch] for C++/52369 From: =?ISO-8859-1?Q?Fabien_Ch=EAne?= To: Jason Merrill Cc: GCC Patches X-IsSubscribed: yes 2014-04-02 22:39 GMT+02:00 Jason Merrill : > 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 * 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. 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 {