[Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Jan 23 15:25:00 GMT 2004
In bits/fstream.tcc, we have this function:
-----------------------
template<typename _CharT, typename _Traits>
typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>::
underflow()
{
int_type __ret = traits_type::eof();
const bool __testin = this->_M_mode & ios_base::in;
const bool __testout = this->_M_mode & ios_base::out;
if (__testin && !_M_writing)
.....
--------------------
The problem is that __testout is not used anywhere in this function.
I don't know whether that's a bug, but it's a nuisance when reducing
testcases: when one strips off all #line markers in preprocessed
sources and compiles with warnings on, then one also gets to see
warnings for this.
W.
--
Summary: Unused variable in basic_filebuf::underflow
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
More information about the Gcc-bugs
mailing list