From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10500 invoked by alias); 9 Aug 2007 13:40:34 -0000 Received: (qmail 10368 invoked by uid 22791); 9 Aug 2007 13:40:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Aug 2007 13:40:20 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 725A9982CE; Thu, 9 Aug 2007 13:40:20 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3A665982C5; Thu, 9 Aug 2007 13:40:20 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IJ8FN-0002iD-Hc; Thu, 09 Aug 2007 09:40:17 -0400 Date: Thu, 09 Aug 2007 13:40:00 -0000 From: Daniel Jacobowitz To: "Kaveh R. GHAZI" Cc: DJ Delorie , gcc-patches@gcc.gnu.org Subject: Re: Add a __nowarn__ keyword Message-ID: <20070809134017.GA10368@caradoc.them.org> Mail-Followup-To: "Kaveh R. GHAZI" , DJ Delorie , gcc-patches@gcc.gnu.org References: <46B9F0B5.1080302@gnu.org> <200708082254.l78MsIC8014802@greed.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00570.txt.bz2 On Wed, Aug 08, 2007 at 10:35:54PM -0400, Kaveh R. GHAZI wrote: > If we go with __nowarn__ (or __warn__) I believe the syntax is well > defined since it mimics the long-standing __extension__ behavior. It > cleanly handles the push/pop paradigm because the handler code resides in > the parser. Any time it sees the __extesion__ or __nowarn__ token, the > parser saves the current value of the warning flag, consumes the token and > recurses parsing. When the recursion returns, it restores the old value > of the warning flag in question and proceeds. Simple. Correct me if I'm wrong, but won't this work in exactly the same set of cases where DJ's pragmas would work? They're the cases that don't care about his #2. -- Daniel Jacobowitz CodeSourcery