From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16121 invoked by alias); 20 Oct 2002 19: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 16092 invoked by uid 71); 20 Oct 2002 19:26:00 -0000 Resent-Date: 20 Oct 2002 19:26:00 -0000 Resent-Message-ID: <20021020192600.16089.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, drepper@redhat.com Received: (qmail 15515 invoked by uid 61); 20 Oct 2002 19:21:32 -0000 Message-Id: <20021020192132.15514.qmail@sources.redhat.com> Date: Sun, 20 Oct 2002 12:26:00 -0000 From: drepper@redhat.com Reply-To: drepper@redhat.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/8293: C99 declaration syntax not accepted after case label X-SW-Source: 2002-10/txt/msg00757.txt.bz2 List-Id: >Number: 8293 >Category: c >Synopsis: C99 declaration syntax not accepted after case label >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Oct 20 12:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Ulrich Drepper >Release: gcc 3.2 >Organization: >Environment: Linux x86, but this is platform independent >Description: If a variable declaration follows directly to a case label the compiler reports an error. C99 allows this and gcc must support it if -std=c99 or -stdc=gnu99 is used. >How-To-Repeat: Compile: int foo (int x) { switch (x) { case 1: int y = x; return y; default: return x + 1; } } >Fix: N/A >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="u.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="u.c" aW50IGZvbyAoaW50IHgpIHsgc3dpdGNoICh4KSB7IGNhc2UgMTogaW50IHkgPSB4OyByZXR1cm4g eTsgZGVmYXVsdDogcmV0dXJuIHggKyAxOyB9IH0K