From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10759 invoked by alias); 6 Aug 2007 00:32:18 -0000 Received: (qmail 10740 invoked by uid 22791); 6 Aug 2007 00:32:17 -0000 X-Spam-Check-By: sourceware.org Received: from postal.cs.tamu.edu (HELO postal.cs.tamu.edu) (128.194.138.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 00:32:15 +0000 Received: from gauss.cs.tamu.edu (gauss.cs.tamu.edu [128.194.146.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by postal.cs.tamu.edu (Postfix) with ESMTP id 9AACC46DE06; Sun, 5 Aug 2007 19:32:13 -0500 (CDT) Date: Mon, 06 Aug 2007 00:32:00 -0000 From: Gabriel Dos Reis To: Mark Mitchell cc: "Kaveh R. GHAZI" , Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: [PATCH]: Fix problematic -Wcast-qual cases using new CONST_CAST macro In-Reply-To: <46B668EB.6080708@codesourcery.com> Message-ID: References: <84fc9c000707270219i4702de61y70899cd7e3349d72@mail.gmail.com> <84fc9c000707271138u6171f592x3f69800f12106a0a@mail.gmail.com> <87odhozdvp.fsf@soliton.cs.tamu.edu> <46B668EB.6080708@codesourcery.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 X-SW-Source: 2007-08/txt/msg00287.txt.bz2 On Sun, 5 Aug 2007, Mark Mitchell wrote: | Gabriel Dos Reis wrote: | | > | Richard, do you have any remaining objections to this patch? | > | http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01993.html | | I'm not very keen on the use of a union here, just as a way to outwit | our own warning machinery. A good point that the union is overkill. | For grep-ability, just using CONST_CAST with | a definition that is a traditional C-style cast, would work fine. The compiler will "see" through the macro expansion and will start warning when -Wcast-qual is on. | Or, | can we go through an inline function, with warnings disabled on the | inline function? I don't know whether this works; Kaveh can you try it? (You would still have to write the function name all caps). -- Gaby