From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11468 invoked by alias); 8 Aug 2007 13:06:55 -0000 Received: (qmail 11306 invoked by uid 22791); 8 Aug 2007 13:06:54 -0000 X-Spam-Check-By: sourceware.org Received: from caip.rutgers.edu (HELO caip.rutgers.edu) (128.6.236.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 13:06:51 +0000 Received: from caipclassic.rutgers.edu (caipclassic.rutgers.edu [128.6.237.54]) by caip.rutgers.edu (8.13.8/8.13.5) with ESMTP id l78D4fcm004380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 09:04:41 -0400 Date: Wed, 08 Aug 2007 13:06:00 -0000 From: "Kaveh R. GHAZI" To: Gabriel Dos Reis 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/msg00500.txt.bz2 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 So this is not usable for my purposes. --Kaveh -- Kaveh R. Ghazi ghazi@caip.rutgers.edu