This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37070] New: bogus unreachable warning on throw statement
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2008 22:21:38 -0000
- Subject: [Bug c++/37070] New: bogus unreachable warning on throw statement
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 4.3.0 generates the bogus warning below (4.4.0 behaves the same):
$ cat -n t.C && g++ -v && g++ -c -Wunreachable-code t.C
1 void f ()
2 {
3 throw 0;
4 }
5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/sebor/gcc/trunk/configure
--prefix=/build/sebor/bin/gcc-4.4.0/ --enable-languages=c,c++
--with-mpfr=/usr/local/mpfr-2.3.1
Thread model: posix
gcc version 4.4.0 20080808 (experimental) (GCC)
t.C: In function ?void f()?:
t.C:3: warning: will never be executed
--
Summary: bogus unreachable warning on throw statement
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37070