From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8434 invoked by alias); 7 Dec 2001 18:46:03 -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 8378 invoked by uid 71); 7 Dec 2001 18:46:01 -0000 Resent-Date: 7 Dec 2001 18:46:01 -0000 Resent-Message-ID: <20011207184601.8376.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, tromey@redhat.com Received:(qmail 7830 invoked by uid 61); 7 Dec 2001 18:44:29 -0000 Message-Id:<20011207184429.7829.qmail@sources.redhat.com> Date: Fri, 07 Dec 2001 10:46:00 -0000 From: tromey@redhat.com Reply-To: tromey@redhat.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) Subject: c/5044: -Wswitch and `default' case X-SW-Source: 2001-12/txt/msg00433.txt.bz2 List-Id: >Number: 5044 >Category: c >Synopsis: -Wswitch and `default' case >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Dec 07 10:46:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Tom Tromey >Release: current cvs >Organization: >Environment: >Description: Currently -Wswitch requires that a switch not have a default case. This isn't always the most useful thing though. In my situation, I have a bytecode interpreter. I'd like to use -Wswitch to ensure that I haven't left out a bytecode. But I'd also like to have a default case so that erroneous bytecodes are caught. I think -Wswitch should be augmented to allow this case. Perhaps a new -Wswitch-default flag could be added. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: