From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30680 invoked by alias); 24 Dec 2002 00:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30662 invoked by uid 71); 24 Dec 2002 00:26:01 -0000 Resent-Date: 24 Dec 2002 00:26:01 -0000 Resent-Message-ID: <20021224002601.30661.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, gonz@ratloop.com Received: (qmail 27989 invoked by uid 61); 24 Dec 2002 00:17:47 -0000 Message-Id: <20021224001747.27987.qmail@sources.redhat.com> Date: Mon, 23 Dec 2002 16:26:00 -0000 From: gonz@ratloop.com Reply-To: gonz@ratloop.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/9049: No support for selective enabling/disabling of warnings X-SW-Source: 2002-12/txt/msg01252.txt.bz2 List-Id: >Number: 9049 >Category: c >Synopsis: No support for selective enabling/disabling of warnings >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Mon Dec 23 16:26:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Pete Gonzalez >Release: 3.2.1 >Organization: >Environment: Debian Linux >Description: GCC provides no facility for disabling/enabling a warning for a single function or block of code. Every other C/C++ compiler has this feature. Examples: Visual C++: #pragma warning Borland C++: #pragma warn Watcom C++: #pragma warning Here is some sample syntax in Visual C++: int a; #pragma warning( disable : 4705 ) // diable warning void func() { a; } #pragma warning( default : 4705 ) // restore original setting GCC has no such feature, requiring warnings to be disabled globally for an entire file (or project). >How-To-Repeat: N/A >Fix: Implement the "warning" pragma. Or, provide GCC attributes for disabling/enabling warnings. >Release-Note: >Audit-Trail: >Unformatted: