I inherited a C++ project. I'm building in RHEL 5.5 with GCC 4.1.2 via a makefile. The project is huge (hundreds of files) and in general the code is pretty good. However, every so often during compilation I get a GCC warning that says (prefix "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2
"):
/bits/allocator.h: In constructor ‘std::allocator<_Alloc>::allocator() [with _Tp = char]’:
/bits/allocator.h:97: warning: will never be executed
/bits/allocator.h:97: warning: will never be executed
/ext/new_allocator.h: In constructor ‘__gnu_cxx::new_allocator<_Tp>::new_allocator() [with _Tp = char]’:
/ext/new_allocator.h:65: warning: will never be executed
/bits/allocator.h: In destructor ‘std::allocator<_Alloc>::~allocator() [with _Tp = char]’:
/bits/allocator.h:105: warning: will never be executed
/ext/new_allocator.h: In destructor ‘__gnu_cxx::new_allocator<_Tp>::~new_allocator() [with _Tp = char]’:
/ext/new_allocator.h:72: warning: will never be executed
/bits/allocator.h: In copy constructor ‘std::allocator<_Alloc>::allocator(const std::allocator<_Alloc>&) [with _Tp = char]’:
/bits/allocator.h:100: warning: will never be executed
/bits/allocator.h:99: warning: will never be executed
/ext/new_allocator.h: In copy constructor ‘__gnu_cxx::new_allocator<_Tp>::new_allocator(const __gnu_cxx::new_allocator<_Tp>&) [with _Tp = char]’:
/ext/new_allocator.h:67: warning: will never be executed
/bits/allocator.h: In destructor ‘std::allocator<_Alloc>::~allocator() [with _Tp = char]’:
/bits/allocator.h:105: warning: will never be executed
It doesn't give me the source file or line number that the error is originating from. I'm going to go out on a limb and say the headers for GCC are just fine, so what is going on here? I've never encountered this particular warning before.