public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/8652: wstring::c_str() not work
@ 2002-11-28 7:55 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2002-11-28 7:55 UTC (permalink / raw)
To: ejoy, gcc-bugs, gcc-prs, nobody
Synopsis: wstring::c_str() not work
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Wed Nov 20 04:39:44 2002
State-Changed-Why:
Could you possibly post the actual compiler error?
I get, *correctly*, for wstring and string respectively:
"invalid conversion from `const wchar_t*' to `wchar_t*'"
and
"invalid conversion from `const char*' to `char*'"
Thanks, Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8652
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libstdc++/8652: wstring::c_str() not work
@ 2002-11-30 14:07 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2002-11-30 14:07 UTC (permalink / raw)
To: ejoy, gcc-bugs, gcc-prs, nobody
Synopsis: wstring::c_str() not work
State-Changed-From-To: feedback->closed
State-Changed-By: paolo
State-Changed-When: Wed Nov 20 23:49:32 2002
State-Changed-Why:
User error. You may want to change your code as:
const wchar_t* p;
or
p = const_cast<wchar_t*>(ws.c_str());
Thanks for your report, Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8652
^ permalink raw reply [flat|nested] 3+ messages in thread
* libstdc++/8652: wstring::c_str() not work
@ 2002-11-28 4:50 ejoy
0 siblings, 0 replies; 3+ messages in thread
From: ejoy @ 2002-11-28 4:50 UTC (permalink / raw)
To: gcc-gnats
>Number: 8652
>Category: libstdc++
>Synopsis: wstring::c_str() not work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 19 19:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Zhang Le
>Release: gcc 3.2
>Organization:
>Environment:
Linux rh7.3
>Description:
wstring::c_str() cause a compiler error
because current implementation try to return a
"" instead of L"" to wchar_t*.
>How-To-Repeat:
wstring ws;
wchar_t* str = ws.c_str();
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-21 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-28 7:55 libstdc++/8652: wstring::c_str() not work paolo
-- strict thread matches above, loose matches on Subject: below --
2002-11-30 14:07 paolo
2002-11-28 4:50 ejoy
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).