From patchwork Tue Nov 23 18:40:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 48038 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AEE9A385841B for ; Tue, 23 Nov 2021 18:41:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEE9A385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1637692880; bh=pYf2NkmnNr36KJEJ9/g+30s4jhGb9kn8lrXwkiUeoAg=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=DUSVzD/twWJ5dtyl2q/wnfn8zg1d/CKfL7WUexoWrN0RGl3eO7QtoFb7cXhX1rqRm hniKMo4ENSVukqrHuJ/J02Z36no1QhFtJQAqm11tiYHDx5KJkfyklUCQRNPMva2Q+W bySYJ5jksdjr0Rq8NqrB+8I6SyAJGFS38Kh0FSdk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 396723858D28 for ; Tue, 23 Nov 2021 18:40:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 396723858D28 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ANHnTGG017677; Tue, 23 Nov 2021 18:40:49 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ch14sxycx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Nov 2021 18:40:49 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1ANIdBpl027947; Tue, 23 Nov 2021 18:40:49 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ch14sxyct-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Nov 2021 18:40:48 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1ANIb2Fr018068; Tue, 23 Nov 2021 18:40:48 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04dal.us.ibm.com with ESMTP id 3cernbgd1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Nov 2021 18:40:48 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1ANIelVV15598430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Nov 2021 18:40:47 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 120CDAC065; Tue, 23 Nov 2021 18:40:47 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B2ABAC05B; Tue, 23 Nov 2021 18:40:46 +0000 (GMT) Received: from [9.211.97.109] (unknown [9.211.97.109]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 23 Nov 2021 18:40:46 +0000 (GMT) Message-ID: <0fe6d48a-3834-c962-40c1-48bd507c7cea@linux.ibm.com> Date: Tue, 23 Nov 2021 12:40:45 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 To: GCC Patches Subject: [PATCH] rs6000: Clarify overloaded builtin diagnostic X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Pe-wCkLfxNZEcu430YDANkjppd8qWiqk X-Proofpoint-ORIG-GUID: vzq3-XJY6AXDMsrVLAjUlJNOcnOnVdA_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-23_06,2021-11-23_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 clxscore=1015 impostorscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111230090 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bill Schmidt via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: wschmidt@linux.ibm.com Cc: David Edelsohn , Segher Boessenkool Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! When a built-in function required by an overloaded function name is not currently enabled, the diagnostic message is not as clear as it should be. Saying that one built-in "requires" another is somewhat misleading. It is better to explicitly state that the overloaded builtin is implemented by the missing builtin, so the user knows that the previous error message for the implementing builtin is because of the overload relationship. This patch adjusts the informational diagnostic for both the original support and the new builtin support. This doesn't affect the test suite, since we don't test for "note" diagnostics anywhere. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-23 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Clarify diagnostic. (altivec_resolve_new_overloaded_builtin): Likewise. --- gcc/config/rs6000/rs6000-c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index d08bdfec3ae..5eeac9d4c06 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -1946,7 +1946,8 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, non-overloaded function has already been issued. Add clarification of the previous message. */ rich_location richloc (line_table, input_location); - inform (&richloc, "builtin %qs requires builtin %qs", + inform (&richloc, + "overloaded builtin %qs is implemented by builtin %qs", name, internal_name); } else @@ -2992,7 +2993,8 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl, non-overloaded function has already been issued. Add clarification of the previous message. */ rich_location richloc (line_table, input_location); - inform (&richloc, "builtin %qs requires builtin %qs", + inform (&richloc, + "overloaded builtin %qs is implemented by builtin %qs", name, internal_name); } else