From patchwork Fri Jun 17 11:33:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 636921 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 3rWJ6R4mF8z9t23 for ; Fri, 17 Jun 2016 21:33:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=s7wPKOWX; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=TeEkCgTKC+epmAaHcbym/+mgKEC45S83bwZaL80lYAi73adcxm Qw3vWbpqSVMCXBOxw4HDmBOw7R7CraLfd5R86AcxlMCffD4UDdK8Dy95/fiPMEMK +/3FJozrqefBmG+LLip5PpP0OrzJoeTRU9Q2qd4kgdmVME0/tlx7o+fyU= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=B1cKbbHgVbAC3Q0d5deMKjrvBHI=; b=s7wPKOWXCx9fzQSS+LO6 a8aN34kOaXOoZVLdsnDYqBeazRqVMH9xvmG6nJtr799KluCF4ha5JGz9OFqJn0TC TfigCR+wL7MnEkZ/j3e9yEvxORH+pVA9pWkYWmuBMCh3BO5Oaoxf+yuz98MuZuVA o5CKOCt4VOxI7j+Q1gkramI= Received: (qmail 99045 invoked by alias); 17 Jun 2016 11:33:27 -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 99029 invoked by uid 89); 17 Jun 2016 11:33:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1397 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 17 Jun 2016 11:33:16 +0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5HBXEOo003789 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Jun 2016 11:33:14 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u5HBXD1h027241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Jun 2016 11:33:14 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u5HBXCJu019396; Fri, 17 Jun 2016 11:33:12 GMT Received: from [192.168.1.4] (/79.23.238.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 17 Jun 2016 04:33:12 -0700 To: "gcc-patches@gcc.gnu.org" Cc: Jason Merrill From: Paolo Carlini Subject: [C++ Patch] One more error + error to error + inform Message-ID: <5763DFF6.4030501@oracle.com> Date: Fri, 17 Jun 2016 13:33:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, one more I missed. Tested x86_64-linux. Should be obvious too... Thanks, Paolo. PS: I still have pending: https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01116.html ////////////////////// /cp 2016-06-17 Paolo Carlini * decl.c (grokfndecl): Change pair of errors to error + inform. /testsuite 2016-06-17 Paolo Carlini * g++.dg/cpp0x/defaulted31.C: Adjust for dg-message vs dg-error. Index: cp/decl.c =================================================================== --- cp/decl.c (revision 237547) +++ cp/decl.c (working copy) @@ -8295,7 +8295,8 @@ grokfndecl (tree ctype, else if (DECL_DEFAULTED_FN (old_decl)) { error ("definition of explicitly-defaulted %q+D", decl); - error ("%q+#D explicitly defaulted here", old_decl); + inform (DECL_SOURCE_LOCATION (old_decl), + "%q#D explicitly defaulted here", old_decl); return NULL_TREE; } Index: testsuite/g++.dg/cpp0x/defaulted31.C =================================================================== --- testsuite/g++.dg/cpp0x/defaulted31.C (revision 237547) +++ testsuite/g++.dg/cpp0x/defaulted31.C (working copy) @@ -4,7 +4,7 @@ struct A { A() { } // { dg-message "defined" } - ~A() = default; // { dg-error "defaulted" } + ~A() = default; // { dg-message "defaulted" } }; A::A() = default; // { dg-error "redefinition" }