From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10329 invoked by alias); 27 Apr 2017 20:51:27 -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 10306 invoked by uid 89); 27 Apr 2017 20:51:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*f:sk:1493327, H*i:sk:1493327 X-HELO: albireo.enyo.de Received: from albireo.enyo.de (HELO albireo.enyo.de) (5.158.152.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 20:51:25 +0000 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1d3qNg-0003K4-5C; Thu, 27 Apr 2017 22:51:16 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.88) (envelope-from ) id 1d3qNg-0003vb-1U; Thu, 27 Apr 2017 22:51:16 +0200 From: Florian Weimer 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 References: <1493327424-21496-1-git-send-email-dmalcolm@redhat.com> Date: Thu, 27 Apr 2017 21:05:00 -0000 In-Reply-To: <1493327424-21496-1-git-send-email-dmalcolm@redhat.com> (David Malcolm's message of "Thu, 27 Apr 2017 17:10:24 -0400") Message-ID: <87mvb1efqz.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg01434.txt.bz2 * David Malcolm: > gcc/testsuite/ChangeLog: > * g++.dg/other/old-style-cast-fixits.C: New test case. Would it make sense to add a test cases for the non-fixable cases? That would be: void test_1 (const void *ptr) { foo *f = (foo *)ptr; } And: const bar b_inst; foo *f = (foo *)&b_inst; These require const_cast plus static_cast or const_cast plus reinterpret_cast.