From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40933 invoked by alias); 27 Apr 2017 21:03:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 40909 invoked by uid 89); 27 Apr 2017 21:03:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:1493327 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, 27 Apr 2017 21:03:41 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D137FC04BD54; Thu, 27 Apr 2017 21:03:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D137FC04BD54 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=polacek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D137FC04BD54 Received: from redhat.com (ovpn-204-214.brq.redhat.com [10.40.204.214]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v3RL3bKs023336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 27 Apr 2017 17:03:39 -0400 Date: Thu, 27 Apr 2017 22:05:00 -0000 From: Marek Polacek To: David Malcolm Cc: Nathan Sidwell , Volker Reichelt , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] C++: Add fix-it hints for -Wold-style-cast Message-ID: <20170427210337.GF4255@redhat.com> References: <1493327424-21496-1-git-send-email-dmalcolm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493327424-21496-1-git-send-email-dmalcolm@redhat.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-04/txt/msg01436.txt.bz2 On Thu, Apr 27, 2017 at 05:10:24PM -0400, David Malcolm wrote: > + /* First try const_cast. */ > + trial = build_const_cast (dst_type, orig_expr, 0 /* complain */); > + if (trial != error_mark_node) > + return "const_cast"; > + > + /* If that fails, try static_cast. */ > + trial = build_static_cast (dst_type, orig_expr, 0 /* complain */); > + if (trial != error_mark_node) > + return "static_cast"; > + > + /* Finally, try reinterpret_cast. */ > + trial = build_reinterpret_cast (dst_type, orig_expr, 0 /* complain */); > + if (trial != error_mark_node) > + return "reinterpret_cast"; I think you'll want tf_none instead of 0 /* complain */ in these. Marek