First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 12077
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Paolo Carlini <paolo.carlini@oracle.com>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Pétur Runólfsson <peturrun@gmail.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
cinshowmanycbug.cc Test case text/plain 2003-08-27 11:09 759 bytes Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 12077 depends on: Show dependency tree
Show dependency graph
Bug 12077 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2003-12-31 16:04 Opened: 2003-08-27 11:09
When stdin is bound to a regular file, wcin.rdbuf()->showmanyc() returns the
number of bytes in the file, which may be higher than the number of
characters in the file when using multibyte character sets such as utf-8.

------- Comment #1 From Pétur Runólfsson 2003-08-27 11:09 -------
Created an attachment (id=4660) [edit]
Test case

------- Comment #2 From Paolo Carlini 2004-03-18 17:04 -------
... so, shall I add to stdio_sync_filebuf a non-trivial imbue and tweak
showmanyc consistently, similarly to basic_filebuf?!?

Thanks.

------- Comment #3 From Pétur Runólfsson 2004-03-19 08:39 -------
> ... so, shall I add to stdio_sync_filebuf a non-trivial imbue and tweak
> showmanyc consistently, similarly to basic_filebuf?!?

There's no way to find out the conversion used by the underlying FILE*, so
the only reasonable thing to do is to return 0 from showmanyc.

------- Comment #4 From CVS Commits 2004-03-19 19:31 -------
Subject: Bug 12077

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2004-03-19 19:31:38

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/ext: stdio_sync_filebuf.h 
	libstdc++-v3/testsuite/27_io/objects/char: 9.cc 
Added files:
	libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t: 12077.cc 

Log message:
	2004-03-19  Paolo Carlini  <pcarlini@suse.de>
	Petur Runolfsson  <peturr02@ru.is>
	
	PR libstdc++/12077
	* include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's
	no way to find out the conversion used by the underlying FILE*.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New.
	* testsuite/27_io/objects/char/9.cc: Tweak.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2409&r2=1.2410
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/ext/stdio_sync_filebuf.h.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/objects/char/9.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5


------- Comment #5 From CVS Commits 2004-04-21 09:59 -------
Subject: Bug 12077

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	paolo@gcc.gnu.org	2004-04-21 09:59:12

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/ext: stdio_sync_filebuf.h 
	libstdc++-v3/testsuite/27_io/objects/char: 9.cc 
Added files:
	libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t: 12077.cc 

Log message:
	2004-04-21  Paolo Carlini  <pcarlini@suse.de>
	Petur Runolfsson  <peturr02@ru.is>
	
	PR libstdc++/12077
	* include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's
	no way to find out the conversion used by the underlying FILE*.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New.
	* testsuite/27_io/objects/char/9.cc: Tweak.

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.77&r2=1.2224.2.78
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/ext/stdio_sync_filebuf.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.7&r2=1.7.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/objects/char/9.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.4&r2=1.4.4.1


------- Comment #6 From Paolo Carlini 2004-04-21 10:00 -------
Fixed for 3.4.1.

First Last Prev Next    No search results available      Search page      Enter new bug