From: Dmitry Koudryavtsev <juliasoft@mail.ru> To: community@altlinux.ru Subject: [Comm] g++ 3.2.1 É wstring Date: Fri, 7 Feb 2003 16:53:18 +0300 Message-ID: <16627211968.20030207165318@mail.ru> (raw) Здравствуйте! Вот, нарвался непонятно на что... :( -fshort-wchar - баг компилятора или мои глюки ? $ cat wc_test.cc #include <string> #include <cwchar> using namespace std; int main() { wstring s; s = L"Teest 1"; // 7 wide chars ! printf("s.length()=%d, s.size()=%d\n",s.length(), s.size()); return 0; } $ g++ wc_test.cc -o wc_test $ ./wc_test >s.length()=7, s.size()=7 $ g++ wc_test.cc -o wc_test -fshort-wchar $ ./wc_test >s.length()=16, s.size()=16 >А должно быть 7 (!) $ rpm -q gcc3.2-c++ gcc3.2-c++-3.2.1-alt2 >В 2.96 все прокатывает ( кроме вызова s.c_str() :) >#select-gcc 2.96 $ g++ wc_test.cc -o wc_test $ ./wc_test >s.length()=7, s.size()=7 $ g++ wc_test.cc -o wc_test -fshort-wchar $ ./wc_test >s.length()=7, s.size()=7 -- С уважением, Dmitry Koudryavtsev mailto:juliasoft@mail.ru
next reply other threads:[~2003-02-07 13:53 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-07 13:53 Dmitry Koudryavtsev [this message] 2003-02-07 14:19 ` [Comm] g++ 3.2.1 и wstring Sergey Vlasov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=16627211968.20030207165318@mail.ru \ --to=juliasoft@mail.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git