This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16506] missing -Wunreachable-code warning from generic code


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]