This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/8104: cann't use wcout and wprintf to print wchat_t* in gcc-3.2 and gcc-3.1


>Number:         8104
>Category:       libstdc++
>Synopsis:       cann't use wcout and wprintf to print wchat_t* in gcc-3.2 and gcc-3.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 30 21:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     dragzhb@163.net
>Release:        gcc-3.2
>Organization:
>Environment:
linux and cygwin
>Description:
I cann't use wcout and wprintf to print wchat_t string in gcc-3.2 and gcc-3.1,but I can use wcout to print wchar_t* in gcc-3.0.4,that's why?

the following lines are the source code:
#include <iostream>

using namespace std;

//#define _GLIBCPP_USE_WCHAR_T

int main(int argc, char** argv)
{
	const wchar_t* src  = L"hello 张还宾带分数动";
	wcout << "src: " << src << endl;	

}

#include <stdio.h>
#include <wchar.h>
//#include <stdarg.h>

int main(int argc, char** argv)
{
	const wchar_t* src  = L"hello 张还宾带分数动";
	wprintf(L"wstring is : %s \n",src);
		
	return 0;
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]