[Bug c/46158] Spurious never executed warning

wkf at alum dot mit.edu gcc-bugzilla@gcc.gnu.org
Sun Oct 24 19:59:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46158

--- Comment #1 from William K Foster <wkf at alum dot mit.edu> 2010-10-24 19:59:23 UTC ---
Also, in a much more complicated test case (not provided) I get a much more
obtuse warning message that does not refer me to my file, but instead a header:

/usr/include/c++/4.2/bits/allocator.h: In copy constructor
'std::allocator<_Alloc>::allocator(const std::allocator<_Alloc>&) [with _Tp =
char]':
/usr/include/c++/4.2/bits/allocator.h:103: warning: will never be executed
/usr/include/c++/4.2/bits/allocator.h:102: warning: will never be executed
/usr/include/c++/4.2/ext/new_allocator.h: In copy constructor
'__gnu_cxx::new_allocator<_Tp>::new_allocator(const
__gnu_cxx::new_allocator<_Tp>&) [with _Tp = char]':
/usr/include/c++/4.2/ext/new_allocator.h:70: warning: will never be executed
/usr/include/c++/4.2/bits/allocator.h: In destructor
'std::allocator<_Alloc>::~allocator() [with _Tp = char]':
/usr/include/c++/4.2/bits/allocator.h:108: warning: will never be executed
/usr/include/c++/4.2/ext/new_allocator.h: In destructor
'__gnu_cxx::new_allocator<_Tp>::~new_allocator() [with _Tp = char]':
/usr/include/c++/4.2/ext/new_allocator.h:75: warning: will never be executed
/usr/include/c++/4.2/bits/allocator.h: In destructor
'std::allocator<_Alloc>::~allocator() [with _Tp = char]':
/usr/include/c++/4.2/bits/allocator.h:108: warning: will never be executed
gmake: *** [ARCH.freebsd_61_i86/debug/opFlume_delta.o] Error 1



More information about the Gcc-bugs mailing list