public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels
@ 2004-11-15  3:22 fn_x at hotmail dot com
  2004-11-15  3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fn_x at hotmail dot com @ 2004-11-15  3:22 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-16 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15  3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
2004-11-15  3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-11-27 18:40 ` roger at eyesopen dot com
2004-12-14  9:02 ` ebotcazou at gcc dot gnu dot org
2004-12-16 14:43 ` cvs-commit at gcc dot gnu dot org
2004-12-16 16:25 ` pinskia at gcc dot gnu dot org
2004-12-16 17:52 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).