From patchwork Thu May 25 10:07:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 766921 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 3wYQ1220LPz9s7B for ; Thu, 25 May 2017 20:07:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ZznP40KN"; 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=HXqz5+GVLYDAguyxR b2kecG0Bppi7Tsj/zLi6YJ/RlusSFco9N0RN8rL19yY+EUVv43RcNjT07NbPmidS FXI1dM2vTIievrLciAkrwaaPDV99tmLTO+Bhy2UOCteLtQzYvaIANOsB5HI0H1Gz 105NviuLH42lp9asWEaSZGftmo= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=8r/2PqN4HvU/akZb9VwTMjM uJnE=; b=ZznP40KNNrUXBe74p7hcfHWsyrOoLsfsY7+FCgEJbPngr0KSpdzHQ0o oOEfi39nbrxPe1P+2qju1aCQmd7VMTZaNORpcO3XEueS+lYcupu/lgEIw0S3M315 lEirp4MAQQJ5NCmbZc+3ClVaRZXG/DyHoED1aCNi36BPQgIKgPDc= Received: (qmail 30127 invoked by alias); 25 May 2017 10:07:01 -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 30096 invoked by uid 89); 25 May 2017 10:07:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 May 2017 10:06:59 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E41182D9FC7; Thu, 25 May 2017 10:07:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E41182D9FC7 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E41182D9FC7 Received: from localhost (unknown [10.33.36.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CBCE81B51; Thu, 25 May 2017 10:07:01 +0000 (UTC) Date: Thu, 25 May 2017 11:07:00 +0100 From: Jonathan Wakely To: Andreas Schwab Cc: Jason Merrill , gcc-patches List , Nathan Sidwell Subject: Re: [PATCH] PR c++/80544 strip cv-quals from cast results Message-ID: <20170525100700.GU12306@redhat.com> References: <20170427165907.GL5109@redhat.com> <20170523180046.GG12306@redhat.com> <20170524142022.GJ12306@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.8.0 (2017-02-23) On 25/05/17 10:05 +0200, Andreas Schwab wrote: >../../gcc/ada/gcc-interface/utils2.c: In function 'int compare_elmt_bitpos(const void*, const void*)': >../../gcc/ada/gcc-interface/utils2.c:1937:73: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] > const constructor_elt * const elmt1 = (const constructor_elt * const) rt1; > ^~~ >../../gcc/ada/gcc-interface/utils2.c:1938:73: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] > const constructor_elt * const elmt2 = (const constructor_elt * const) rt2; I'm testing this obvious fix. diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index fc6f1b8..cd37791 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1934,8 +1934,8 @@ build_call_raise_range (int msg, Node_Id gnat_node, char kind, static int compare_elmt_bitpos (const PTR rt1, const PTR rt2) { - const constructor_elt * const elmt1 = (const constructor_elt * const) rt1; - const constructor_elt * const elmt2 = (const constructor_elt * const) rt2; + const constructor_elt * const elmt1 = (const constructor_elt *) rt1; + const constructor_elt * const elmt2 = (const constructor_elt *) rt2; const_tree const field1 = elmt1->index; const_tree const field2 = elmt2->index; const int ret