This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85732] New: use_facet<moneypunct<char, true>>(mylocale) retrieving wrong locale information
- From: "gnu-org at bignm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 May 2018 12:23:20 +0000
- Subject: [Bug c++/85732] New: use_facet<moneypunct<char, true>>(mylocale) retrieving wrong locale information
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85732
Bug ID: 85732
Summary: use_facet<moneypunct<char, true>>(mylocale) retrieving
wrong locale information
Product: gcc
Version: 6.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gnu-org at bignm dot com
Target Milestone: ---
Created attachment 44110
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44110&action=edit
Source code and test output results showing error
Dear Bug Team,
I just recently upgraded using "apt" my Ubuntu 16.04 system and gcc was
upgraded from 6.2.0 to 6.4.0 which introduced the following bug.
In the attached archive is a program "testlocale.cpp" which requires only
gcc-supplied header files. The command line to compile it and execute it is in
the comments at the top of the file.
In essence, it tests each facet of three locales (on my system "en_US.utf8",
"pt_BR.utf8" and "C" locales. All worked perfectly in g++ 6.2.0. As of g++
6.4.0, all of the facets, except the "moneypunct" facet work properly (see line
134).
Here is my information:
Linux version
$ uname -a
Linux asusubuntu16 4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Compiler version
$ gcc --version
gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compile command:
$ g++ -std=c++14 -m64 testlocale.cpp -static -o testlocale
Run command:
$ ./testlocale > testlocale.out
Attached is a test output generated by gcc 6.4.0 on my system. Of course, you
can test it on your system yourself and try to duplicate the error.
Best regards,
Tom Straub