From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1135 invoked by alias); 8 Aug 2007 22:54:30 -0000 Received: (qmail 1067 invoked by uid 22791); 8 Aug 2007 22:54:29 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 22:54:25 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l78MsK6b009609; Wed, 8 Aug 2007 18:54:20 -0400 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [10.11.254.111]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l78MsK48003351; Wed, 8 Aug 2007 18:54:20 -0400 Received: from greed.delorie.com (vpn-14-4.rdu.redhat.com [10.11.14.4]) by post-office.corp.redhat.com (8.13.8/8.13.8) with ESMTP id l78MsJMU015671; Wed, 8 Aug 2007 18:54:19 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.13.8/8.13.8) with ESMTP id l78MsJwC014805; Wed, 8 Aug 2007 18:54:19 -0400 Received: (from dj@localhost) by greed.delorie.com (8.13.8/8.13.8/Submit) id l78MsIC8014802; Wed, 8 Aug 2007 18:54:18 -0400 Date: Wed, 08 Aug 2007 22:54:00 -0000 Message-Id: <200708082254.l78MsIC8014802@greed.delorie.com> From: DJ Delorie To: ghazi@caip.rutgers.edu CC: gcc-patches@gcc.gnu.org In-reply-to: (ghazi@caip.rutgers.edu) Subject: Re: Add a __nowarn__ keyword References: <46B9F0B5.1080302@gnu.org> 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/msg00552.txt.bz2 > If you're saying that, by design, your pragma interface only allows a > once-per-file setting that must come before all function definitions, then > it isn't suited to do what I want. I need something that allows > per-statement warning silence, then reset to whatever was before, and then > do that as many times as necessary. Right. The current interface has two parts: The master table of what to do with each diagnostic, and the #pragma to change the table. What's missing are two things: 1. A chain of "what changed" with back pointers, so we can implement push/pop, nested settings, and a "revert" option, and 2. A way to associate a link on that chain with a point in the program in a meaningful way. It's the "meaningful way" that was hard to define back then. Anyway, item 1 is relatively easy, but not useful (or at least ill-defined) without completing #2. #2 is hard. Now, if a __warn__ syntax is well-defined, perhaps we could add item #1 as a way to implement it?