public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17026] New: Error at last empty case in switch block.
@ 2004-08-14 13:46 do8896 at db dot com
2004-08-14 13:48 ` [Bug c/17026] " do8896 at db dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: do8896 at db dot com @ 2004-08-14 13:46 UTC (permalink / raw)
To: gcc-bugs
GCC misunderstanding empty case in switch, such as:
switch(hmm)
{
case 0:
do_smth();
case 1: //<-- gcc stops here
}
or
switch(hmm)
{
case 0:
do_smth();
default: //<-- gcc stops here
}
Those code-constructions meets in libgda and libgnome-db( and may be all of this
codes normally compiled under older versions of gcc)
--
Summary: Error at last empty case in switch block.
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: do8896 at db 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=17026
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17026] Error at last empty case in switch block.
2004-08-14 13:46 [Bug c/17026] New: Error at last empty case in switch block do8896 at db dot com
@ 2004-08-14 13:48 ` do8896 at db dot com
2004-08-14 13:54 ` do8896 at db dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: do8896 at db dot com @ 2004-08-14 13:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From do8896 at db dot com 2004-08-14 13:48 -------
Created an attachment (id=6924)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6924&action=view)
Preprocessed file of examples
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17026
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17026] Error at last empty case in switch block.
2004-08-14 13:46 [Bug c/17026] New: Error at last empty case in switch block do8896 at db dot com
2004-08-14 13:48 ` [Bug c/17026] " do8896 at db dot com
2004-08-14 13:54 ` do8896 at db dot com
@ 2004-08-14 13:54 ` falk at debian dot org
2004-08-14 15:01 ` jsm at polyomino dot org dot uk
3 siblings, 0 replies; 5+ messages in thread
From: falk at debian dot org @ 2004-08-14 13:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2004-08-14 13:54 -------
This is invalid code, a label must be followed by a statement.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17026
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17026] Error at last empty case in switch block.
2004-08-14 13:46 [Bug c/17026] New: Error at last empty case in switch block do8896 at db dot com
2004-08-14 13:48 ` [Bug c/17026] " do8896 at db dot com
@ 2004-08-14 13:54 ` do8896 at db dot com
2004-08-14 13:54 ` falk at debian dot org
2004-08-14 15:01 ` jsm at polyomino dot org dot uk
3 siblings, 0 replies; 5+ messages in thread
From: do8896 at db dot com @ 2004-08-14 13:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From do8896 at db dot com 2004-08-14 13:53 -------
Compile command: gcc -v -save-temps -o a a.c
Compiler stderr&stdout output:
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: /var/tmp/portage/gcc-3.4.1-r2/work/gcc-3.4.1/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++ --enable-threads=posix --enable-long-long
--disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3
--with-local-prefix=/usr/local --disable-werror --enable-shared --enable-nls
--without-included-gettext --disable-multilib --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 3.4.1 20040803 (Gentoo Linux 3.4.1-r2, ssp-3.4-2, pie-8.7.6.5)
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 -E -quiet -v a.c -mtune=pentiumpro
-o a.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include
/usr/include
End of search list.
a.c:24:2: warning: no newline at end of file
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 -fpreprocessed a.i -quiet
-dumpbase a.c -mtune=pentiumpro -auxbase a -version -o a.s
GNU C version 3.4.1 20040803 (Gentoo Linux 3.4.1-r2, ssp-3.4-2, pie-8.7.6.5)
(i686-pc-linux-gnu)
compiled by GNU C version 3.4.1 20040803 (Gentoo Linux 3.4.1-r2, ssp-3.4-2,
pie-8.7.6.5).
GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15717
a.c: In function `stub1':
a.c:12: error: label at end of compound statement
a.c: In function `main':
a.c:21: error: too few arguments to function `stub1'
a.c:23: error: label at end of compound statement
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17026
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17026] Error at last empty case in switch block.
2004-08-14 13:46 [Bug c/17026] New: Error at last empty case in switch block do8896 at db dot com
` (2 preceding siblings ...)
2004-08-14 13:54 ` falk at debian dot org
@ 2004-08-14 15:01 ` jsm at polyomino dot org dot uk
3 siblings, 0 replies; 5+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-08-14 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-14 15:01 -------
Subject: Re: New: Error at last empty case in switch block.
On Sat, 14 Aug 2004, do8896 at db dot com wrote:
> Those code-constructions meets in libgda and libgnome-db( and may be all of this
> codes normally compiled under older versions of gcc)
This undocumented extension was deprecated (with a mandatory warning when
it was used) in 3.0, released June 18, 2001, and removed in 3.4.0,
released April 18, 2004. How long would you expect undocumented
extensions to be deprecated before being removed, if nearly three years
isn't enough? The normal period for most deprecations is a single release
(e.g. deprecate in 3.3 and remove in 3.4), which allows about a year for
people to see and fix the warnings, but undocumented extensions are
subject to change and removal without deprecation period - indeed, removal
by accident if someone didn't realise they were part of the extended
language. The ease of fixing - in this case, by adding a single semicolon
- is a relevant factor in deprecation; we simply didn't happen to get
round to removing this extension until 3.4 though removal in 3.1 would
have been reasonable.
http://gcc.gnu.org/gcc-3.0/caveats.html
http://gcc.gnu.org/gcc-3.4/changes.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17026
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-14 15:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-14 13:46 [Bug c/17026] New: Error at last empty case in switch block do8896 at db dot com
2004-08-14 13:48 ` [Bug c/17026] " do8896 at db dot com
2004-08-14 13:54 ` do8896 at db dot com
2004-08-14 13:54 ` falk at debian dot org
2004-08-14 15:01 ` jsm at polyomino dot org dot uk
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).