This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16506] missing -Wunreachable-code warning from generic code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2004 00:27:18 -0000
- Subject: [Bug c++/16506] missing -Wunreachable-code warning from generic code
- References: <20040713001824.16506.sebor@roguewave.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-13 00:27 -------
Again this is fixed on the mainline:
grendel:~/src/gnu/gcctest>gcc -Wunreachable-code pr16506.cc -S -O0
pr16506.cc: In function `void Construct(T*, const T&) [with T = int]':
pr16506.cc:17: instantiated from `void uninitialized_fill_n(ForwardIterator, Size, const T&) [with
ForwardIterator = int*, Size = int, T = int]'
pr16506.cc:30: instantiated from here
pr16506.cc:6: warning: will never be executed
/export/gates/pinskia/openbsd/bin/../lib/gcc/i686-unknown-openbsd3.1/3.5.0/../../../../include/
c++/3.5.0/new: In function `void* operator new(size_t, void*)':
/export/gates/pinskia/openbsd/bin/../lib/gcc/i686-unknown-openbsd3.1/3.5.0/../../../../include/
c++/3.5.0/new:92: warning: will never be executed
grendel:~/src/gnu/gcctest>gcc -Wunreachable-code pr16506.cc -S -O0
-D"Construct(p,x)=new(p)T(x)"
pr16506.cc: In function `void uninitialized_fill_n(ForwardIterator, Size, const T&) [with ForwardIterator
= int*, Size = int, T = int]':
pr16506.cc:30: instantiated from here
pr16506.cc:17: warning: will never be executed
pr16506.cc:19: warning: will never be executed
/export/gates/pinskia/openbsd/bin/../lib/gcc/i686-unknown-openbsd3.1/3.5.0/../../../../include/
c++/3.5.0/new: In function `void* operator new(size_t, void*)':/export/gates/pinskia/openbsd/bin/../
lib/gcc/i686-unknown-openbsd3.1/3.5.0/../../../../include/c++/3.5.0/new:92: warning: will never be
executed
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16506