public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow
@ 2004-01-23 15:25 bangerth at dealii dot org
2004-01-23 15:33 ` [Bug libstdc++/13831] " bangerth at dealii dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-01-23 15:25 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
@ 2004-01-23 15:33 ` bangerth at dealii dot org
2004-01-23 16:22 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-01-23 15:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-01-23 15:33 -------
More of these cases:
bits/locale_facets.h:
string_type
_M_convert_from_char(char* __msg) const
{
// Length of message string without terminating null.
size_t __len = char_traits<char>::length(__msg) - 1;
...
Here, __len is only used inside blocks that are removed by #if 0. Also,
the parameter __msg is unused.
bits/streambuf_iterator.h:
bool
equal(const istreambuf_iterator& __b) const
{
const int_type __eof = traits_type::eof();
bool __thiseof = _M_at_eof();
bool __beof = __b._M_at_eof();
return (__thiseof && __beof || (!__thiseof && !__beof));
}
__eof is unused
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
2004-01-23 15:33 ` [Bug libstdc++/13831] " bangerth at dealii dot org
@ 2004-01-23 16:22 ` pinskia at gcc dot gnu dot org
2004-01-23 16:23 ` pcarlini at suse dot de
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-23 16:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-23 16:22 -------
This is also true in 3.4.0, Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-01-23 16:22:19
date| |
Version|tree-ssa |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
2004-01-23 15:33 ` [Bug libstdc++/13831] " bangerth at dealii dot org
2004-01-23 16:22 ` pinskia at gcc dot gnu dot org
@ 2004-01-23 16:23 ` pcarlini at suse dot de
2004-01-23 16:51 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2004-01-23 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2004-01-23 16:23 -------
Ok, let's clean-up a bit that stuff!
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
` (2 preceding siblings ...)
2004-01-23 16:23 ` pcarlini at suse dot de
@ 2004-01-23 16:51 ` cvs-commit at gcc dot gnu dot org
2004-01-23 17:17 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-23 16:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-23 16:51 -------
Subject: Bug 13831
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2004-01-23 16:51:24
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: fstream.tcc streambuf_iterator.h
locale_facets.h
Log message:
2004-01-23 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13831
* include/bits/fstream.tcc (underflow): Remove unused
variable.
* include/bits/streambuf_iterator.h (equal): Ditto.
* include/bits/locale_facets.h (_M_convert_from_char):
Ditto.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2240&r2=1.2241
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.116&r2=1.117
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/streambuf_iterator.h.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.h.diff?cvsroot=gcc&r1=1.85&r2=1.86
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
` (3 preceding siblings ...)
2004-01-23 16:51 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-23 17:17 ` cvs-commit at gcc dot gnu dot org
2004-01-23 17:19 ` pcarlini at suse dot de
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-23 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-23 17:17 -------
Subject: Bug 13831
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: paolo@gcc.gnu.org 2004-01-23 17:17:19
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: fstream.tcc streambuf_iterator.h
locale_facets.h
Log message:
2004-01-23 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13831
* include/bits/fstream.tcc (underflow): Remove unused
variable.
* include/bits/streambuf_iterator.h (equal): Ditto.
* include/bits/locale_facets.h (_M_convert_from_char):
Ditto.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.4&r2=1.2224.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.116&r2=1.116.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/streambuf_iterator.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.14&r2=1.14.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.85&r2=1.85.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
` (4 preceding siblings ...)
2004-01-23 17:17 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-23 17:19 ` pcarlini at suse dot de
2004-01-23 17:23 ` pinskia at gcc dot gnu dot org
2004-01-23 17:54 ` bangerth at dealii dot org
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2004-01-23 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2004-01-23 17:19 -------
Fixed mainline and 3_4-branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
` (5 preceding siblings ...)
2004-01-23 17:19 ` pcarlini at suse dot de
@ 2004-01-23 17:23 ` pinskia at gcc dot gnu dot org
2004-01-23 17:54 ` bangerth at dealii dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-23 17:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/13831] Unused variable in basic_filebuf::underflow
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
` (6 preceding siblings ...)
2004-01-23 17:23 ` pinskia at gcc dot gnu dot org
@ 2004-01-23 17:54 ` bangerth at dealii dot org
7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-01-23 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-01-23 17:54 -------
Thanks, Paolo! This must have been the bug with the shortest turn
around time between reporting and fixing!
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13831
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-01-23 17:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-23 15:25 [Bug libstdc++/13831] New: Unused variable in basic_filebuf::underflow bangerth at dealii dot org
2004-01-23 15:33 ` [Bug libstdc++/13831] " bangerth at dealii dot org
2004-01-23 16:22 ` pinskia at gcc dot gnu dot org
2004-01-23 16:23 ` pcarlini at suse dot de
2004-01-23 16:51 ` cvs-commit at gcc dot gnu dot org
2004-01-23 17:17 ` cvs-commit at gcc dot gnu dot org
2004-01-23 17:19 ` pcarlini at suse dot de
2004-01-23 17:23 ` pinskia at gcc dot gnu dot org
2004-01-23 17:54 ` bangerth at dealii dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).