public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
[not found] <bug-16251-658@http.gcc.gnu.org/bugzilla/>
@ 2008-02-10 13:02 ` manu at gcc dot gnu dot org
2008-02-10 14:36 ` pcarlini at suse dot de
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-02-10 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2008-02-10 13:01 -------
This is still a problem in GCC 4.1.2 and GCC 4.3
manuel@gcc12:~$ ./test
terminate called after throwing an instance of 'std::bad_cast'
what(): St8bad_cast
foobarAborted
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.1.2 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2008-02-10 13:01:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
[not found] <bug-16251-658@http.gcc.gnu.org/bugzilla/>
2008-02-10 13:02 ` [Bug libstdc++/16251] bogus default constructor for std::basic_iostream manu at gcc dot gnu dot org
@ 2008-02-10 14:36 ` pcarlini at suse dot de
2008-02-10 15:49 ` paolo at gcc dot gnu dot org
2008-02-10 15:52 ` pcarlini at suse dot de
3 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2008-02-10 14:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pcarlini at suse dot de 2008-02-10 14:36 -------
On it. I think we can safely implement submitter' suggestion.
--
pcarlini at suse dot de changed:
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=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
[not found] <bug-16251-658@http.gcc.gnu.org/bugzilla/>
2008-02-10 13:02 ` [Bug libstdc++/16251] bogus default constructor for std::basic_iostream manu at gcc dot gnu dot org
2008-02-10 14:36 ` pcarlini at suse dot de
@ 2008-02-10 15:49 ` paolo at gcc dot gnu dot org
2008-02-10 15:52 ` pcarlini at suse dot de
3 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-02-10 15:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo at gcc dot gnu dot org 2008-02-10 15:48 -------
Subject: Bug 16251
Author: paolo
Date: Sun Feb 10 15:48:10 2008
New Revision: 132214
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132214
Log:
2008-02-10 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/16251
* include/std/istream (basic_istream<>::basic_istream()): Call
this->init().
(basic_iostream<>::basic_iostream(basic_streambuf<>*)): Don't
do it here, per 27.6.1.5.1/1.
* include/std/ostream (basic_ostream<>::basic_ostream()): Call
this->init().
* testsuite/27_io/basic_iostream/cons/16251.C: New.
* testsuite/27_io/basic_iostream/cons/2020.cc: Minor tweaks.
Added:
trunk/libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/istream
trunk/libstdc++-v3/include/std/ostream
trunk/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
[not found] <bug-16251-658@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2008-02-10 15:49 ` paolo at gcc dot gnu dot org
@ 2008-02-10 15:52 ` pcarlini at suse dot de
3 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2008-02-10 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pcarlini at suse dot de 2008-02-10 15:51 -------
Nothing will be done in older branches (by the way, I'm coming to the
conclusion that adding the default constructor was probably an error, but
unfortunately is *exported* and in any case we can't just remove it now :(
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
` (3 preceding siblings ...)
2005-06-28 3:24 ` danglin at gcc dot gnu dot org
@ 2005-07-09 16:40 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-09 16:40 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|hppa2.0w-hp-hpux11.00 |
GCC host triplet|hppa2.0w-hp-hpux11.00 |
GCC target triplet|hppa2.0w-hp-hpux11.00 |
Keywords| |documentation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
` (2 preceding siblings ...)
2004-07-07 7:25 ` ralfixx at gmx dot de
@ 2005-06-28 3:24 ` danglin at gcc dot gnu dot org
2005-07-09 16:40 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2005-06-28 3:24 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
2004-07-05 12:49 ` [Bug libstdc++/16251] " ralfixx at gmx dot de
2004-07-06 23:09 ` bkoz at gcc dot gnu dot org
@ 2004-07-07 7:25 ` ralfixx at gmx dot de
2005-06-28 3:24 ` danglin at gcc dot gnu dot org
2005-07-09 16:40 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: ralfixx at gmx dot de @ 2004-07-07 7:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ralfixx at gmx dot de 2004-07-07 07:25 -------
(In reply to comment #2)
> these constructors should be protected, not public. I'll change this.
They are already protected (at least the one istream). In the meantime I read
some more about this topic, and it seems that the standard `allows' these
constructors, with the assumption that the derived class calls Init() later.
So maybe just add a comment to those CTORs that user code needs to call Init()
before doing anything with the stream?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
2004-07-05 12:49 ` [Bug libstdc++/16251] " ralfixx at gmx dot de
@ 2004-07-06 23:09 ` bkoz at gcc dot gnu dot org
2004-07-07 7:25 ` ralfixx at gmx dot de
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-07-06 23:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bkoz at gcc dot gnu dot org 2004-07-06 23:09 -------
these constructors should be protected, not public. I'll change this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/16251] bogus default constructor for std::basic_iostream
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
@ 2004-07-05 12:49 ` ralfixx at gmx dot de
2004-07-06 23:09 ` bkoz at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: ralfixx at gmx dot de @ 2004-07-05 12:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ralfixx at gmx dot de 2004-07-05 12:49 -------
(In reply to comment #0)
> Analysis: in 3.4.0 a default constructor for basic_istream() was added
> (include/.../istream, #562ff)
> protected:
> explicit
> basic_istream(): _M_gcount(streamsize(0)) { }
>
> which leaves the iostream in an ill state.
The exact file name in the 3.4.1 distribution is
gcc-3.4.1/libstdc++-v3/include/std/std_istream.h, line 562 ff.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16251
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-02-10 15:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-16251-658@http.gcc.gnu.org/bugzilla/>
2008-02-10 13:02 ` [Bug libstdc++/16251] bogus default constructor for std::basic_iostream manu at gcc dot gnu dot org
2008-02-10 14:36 ` pcarlini at suse dot de
2008-02-10 15:49 ` paolo at gcc dot gnu dot org
2008-02-10 15:52 ` pcarlini at suse dot de
2004-06-28 19:48 [Bug libstdc++/16251] New: " ralfixx at gmx dot de
2004-07-05 12:49 ` [Bug libstdc++/16251] " ralfixx at gmx dot de
2004-07-06 23:09 ` bkoz at gcc dot gnu dot org
2004-07-07 7:25 ` ralfixx at gmx dot de
2005-06-28 3:24 ` danglin at gcc dot gnu dot org
2005-07-09 16:40 ` pinskia at gcc dot gnu 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).