From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18096 invoked by alias); 8 Aug 2007 13:16:18 -0000 Received: (qmail 17707 invoked by uid 22791); 8 Aug 2007 13:16:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp.cs.tamu.edu (HELO postal.cs.tamu.edu) (128.194.138.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 13:16:01 +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 742BF46DE04; Wed, 8 Aug 2007 08:15:59 -0500 (CDT) Date: Wed, 08 Aug 2007 13:16:00 -0000 From: Gabriel Dos Reis To: "Kaveh R. GHAZI" cc: =?ISO-8859-1?Q?Manuel_L=F3pez-Ib=E1=F1ez?= , Mark Mitchell , Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: Add a __nowarn__ keyword In-Reply-To: Message-ID: References: <87odhozdvp.fsf@soliton.cs.tamu.edu> <46B668EB.6080708@codesourcery.com> <46B6B038.7050601@codesourcery.com> <46B741C7.4080908@codesourcery.com> <6c33472e0708080152i1fd84566pe806fc83f40df417@mail.gmail.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/msg00501.txt.bz2 On Wed, 8 Aug 2007, Kaveh R. GHAZI wrote: | On Wed, 8 Aug 2007, Gabriel Dos Reis wrote: | | > | I am not sure whether this is a good idea since we already have the | > | #pragma GCC diagnostics. But yes, the pragma does not work (yet) at | > | the statement level. | > | > If I understand DJ correctly, they worked at the function definition level; | > that is all we need. Kaveh, did that not work? | > -- Gaby | | I tried using the #pragma on an inline CONST_CAST function, it did not | work for -Wcast-qual warnings. I didn't bother trying to see if it worked | for any others. | | #pragma GCC diagnostic ignored "-Wcast-qual" | extern __inline void *CONST_CAST(const void *cv) | { | return (void *)cv; | } | | % gcc foo.c -Wcast-qual -c | nw.c: In function 'CONST_CAST': | nw.c:4: warning: cast discards qualifiers from pointer target type I believe you have discovered a bug in the compiler :-) -- Gaby