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:59:08 -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:59 -------
Why should there be warnings in gcc's implementation of uninitialized_fill_n when there are so many
indirections which causes the warnings not to happen.
At -O3 I get two warnings which are correct as you passing a size of 0:
/home/gates/pinskia/linux/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/
stl_algobase.h: In function `int main()':
/home/gates/pinskia/linux/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/
stl_algobase.h:583: warning: will never be executed
/home/gates/pinskia/linux/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/
stl_algobase.h:582: warning: will never be executed
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16506