public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-16 19:26 Paolo Carlini
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Carlini @ 2003-02-16 19:26 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/9169; it has been noted by GNATS.

From: Paolo Carlini <pcarlini@unitus.it>
To: =?ISO-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>
Cc: gcc-gnats@gcc.gnu.org,  gcc-bugs@gcc.gnu.org
Subject: Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns
 noconv
Date: Sun, 16 Feb 2003 20:19:53 +0100

 P=E9tur Run=F3lfsson wrote:
 
 >>     Humm. This behavior started when we implemented the=3D20
 > > resolution of DR19, upon your ;) libstdc++/9168!
 >=20
 > Not so, both bugs are in gcc-3.2.1.
 >
 libstdc++/9168 is already fixed in 3.2.2, 3.3 pre and trunk.
 
 Paolo.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview%20audit-trail&database=3D=
 gcc&pr=3D9169=20
 
 
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-17 21:56 Paolo Carlini
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Carlini @ 2003-02-17 21:56 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/9169; it has been noted by GNATS.

From: Paolo Carlini <pcarlini@unitus.it>
To: gcc-gnats@gcc.gnu.org,  peturr02@ru.is,  gcc-bugs@gcc.gnu.org, 
 paolo@gcc.gnu.org,  gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns
 noconv
Date: Mon, 17 Feb 2003 22:51:54 +0100

 Now fixed in the 3_2 branch too.
 
 Paolo.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9169
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-17 20:15 paolo
  0 siblings, 0 replies; 7+ messages in thread
From: paolo @ 2003-02-17 20:15 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, paolo, peturr02

Synopsis: filebuf output fails if codecvt<>::out returns noconv

State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Mon Feb 17 20:15:33 2003
State-Changed-Why:
    Fixed for 3.3 and 3.4.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9169


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-16 17:46 Pétur Runólfsson
  0 siblings, 0 replies; 7+ messages in thread
From: Pétur Runólfsson @ 2003-02-16 17:46 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/9169; it has been noted by GNATS.

From: =?iso-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>
To: <paolo@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<ncm@cantrip.org>,
	<nobody@gcc.gnu.org>,
	<gcc-gnats@gcc.gnu.org>
Cc:  
Subject: RE: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
Date: Sun, 16 Feb 2003 17:40:23 -0000

 >     Humm. This behavior started when we implemented the=20
 > resolution of DR19, upon your ;) libstdc++/9168!
 
 Not so, both bugs are in gcc-3.2.1.
 
 Petur


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-16 16:36 Paolo Carlini
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Carlini @ 2003-02-16 16:36 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/9169; it has been noted by GNATS.

From: Paolo Carlini <pcarlini@unitus.it>
To: gcc-gnats@gcc.gnu.org,  ncm@cantrip.org,  peturr02@ru.is, 
 gcc-bugs@gcc.gnu.org,  paolo@gcc.gnu.org,  gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns
 noconv
Date: Sun, 16 Feb 2003 17:28:43 +0100

 Ah, ok, now I see what you mean: 27.8.1.4, p8
 
 Will fix it.
 
 Paolo.
 
 P.S. P=E9tur, in the future would you please justify your (correct!)
 expectations with citations from the standard? This makes our work
 much easier and faster! Thanks!
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview%20audit-trail&database=3D=
 gcc&pr=3D9169
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-02-16 16:10 paolo
  0 siblings, 0 replies; 7+ messages in thread
From: paolo @ 2003-02-16 16:10 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ncm, nobody, paolo, peturr02

Synopsis: filebuf output fails if codecvt<>::out returns noconv

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Sun Feb 16 16:10:33 2003
Responsible-Changed-Why:
    Analyzing.
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Sun Feb 16 16:10:33 2003
State-Changed-Why:
    Humm. This behavior started when we implemented the resolution of DR19, upon your ;) libstdc++/9168!
    Isn't now expected for a noconv facet (the default do_out)
    to _not_ store anything in the destination sequence?
    Nathan?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9169


^ permalink raw reply	[flat|nested] 7+ messages in thread

* libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv
@ 2003-01-04 10:26 peturr02
  0 siblings, 0 replies; 7+ messages in thread
From: peturr02 @ 2003-01-04 10:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9169
>Category:       libstdc++
>Synopsis:       filebuf output fails if codecvt<>::out returns noconv
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 04 02:26:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     peturr02@ru.is
>Release:        gcc-3.2.1
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
If a codecvt<char, char, mbstate_t> facet that returns false from always_noconv(), but returns noconv from out() is installed in a filebuf, no output is produced.
>How-To-Repeat:
See attachment.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="noconvout.cc"
Content-Disposition: inline; filename="noconvout.cc"

#include <locale>
#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <string>
#include <fstream>
#include <iostream>
using namespace std;

class Cvt_to_upper : public codecvt<char, char, mbstate_t>
{
	typedef codecvt<char, char, mbstate_t> Base;

public:
	explicit Cvt_to_upper(size_t refs = 0)
		: Base(refs)
		{
		}

protected:
	result do_in(state_type&,
		     const extern_type* from, const extern_type* from_end,
		     const extern_type*& from_next,
		     intern_type* to, intern_type* to_end,
		     intern_type*& to_next) const
		{
			while (from < from_end && to < to_end)
				*to++ = toupper(*from++);

			to_next = to;
			from_next = from;
			return from == from_end ? ok : partial;
		}

	bool do_always_noconv() const throw()
		{
			return false;
		}
};

int main()
{
	locale loc1;
	locale loc (loc1, new Cvt_to_upper);
	
	char name[] = "noconvXXXXXX";
	mktemp(name);

	string str ("abcdefghijklmnopqrstuvwxyz");
	string tmp;

	{
		ofstream out;
		out.imbue(loc);
		out.open(name);
		copy(str.begin(), str.end(),
		     ostreambuf_iterator<char>(out));
	}
	{
		ifstream in;
		in.open(name);
		copy(istreambuf_iterator<char>(in),
		     istreambuf_iterator<char>(),
		     back_inserter(tmp));
	}

	remove(name);

	cout << tmp << endl;
	assert(tmp.size() == str.size());
	assert(tmp == str);

	return 0;
}


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-02-17 21:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-16 19:26 libstdc++/9169: filebuf output fails if codecvt<>::out returns noconv Paolo Carlini
  -- strict thread matches above, loose matches on Subject: below --
2003-02-17 21:56 Paolo Carlini
2003-02-17 20:15 paolo
2003-02-16 17:46 Pétur Runólfsson
2003-02-16 16:36 Paolo Carlini
2003-02-16 16:10 paolo
2003-01-04 10:26 peturr02

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).