From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21400 invoked by alias); 15 Nov 2004 03:22:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 21377 invoked by uid 48); 15 Nov 2004 03:22:33 -0000 Date: Mon, 15 Nov 2004 03:22:00 -0000 From: "fn_x at hotmail dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20041115032230.18493.fn_x@hotmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg01814.txt.bz2 List-Id: Hi, int main() { goto bug; switch(0) { bug: return 0; } } This program doesn't compile with gcc 3.4.3. It gives this error message: /tmp/ccetXBGt.o(.text+0x1d): In function `main': : undefined reference to `.L2' However, this: int main() { goto bug; switch(0) { bug: return 0; default: ; } } does compile without a problem. gcc 2.95.3 and 3.3.4 compile both examples. I searched to see if anyone else reported this, and only found bug #17078. I don't know if it's related or just similar. Sorry if I overlooked another bug report. -- Summary: gcc doesn't like switch blocks without case/default labels Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fn_x at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493