Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51140 - std::locale("") not working in glibc 2.3.3
Summary: std::locale("") not working in glibc 2.3.3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-15 10:26 UTC by Bryan Forbes
Modified: 2004-05-29 20:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
test case (main.cc,140 bytes, text/plain)
2004-05-15 10:26 UTC, Bryan Forbes
Details
C test case (test-c.c,330 bytes, text/plain)
2004-05-17 15:43 UTC, Bryan Forbes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Forbes 2004-05-15 10:26:10 UTC
I'm attaching a test case that does not work in gcc 3.4.  std::locale("") should use the locale in LC_ALL, but when you set LC_ALL to anything but "C" or "POSIX", this example will throw an exception.  std::locale() should take all locale's supported by setlocale().
Comment 1 Bryan Forbes 2004-05-15 10:26:52 UTC
Created attachment 31487 [details]
test case

exception thrown:
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Aborted
Comment 2 Bryan Forbes 2004-05-17 15:42:36 UTC
This seems to be a glibc bug with locales.  I'm attaching a test case that sets the locale in C and works, but the the c++ example attached earlier doesn't work.  I also have filed a bug over at glibc's bugzilla:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=165
Comment 3 Bryan Forbes 2004-05-17 15:43:06 UTC
Created attachment 31612 [details]
C test case
Comment 4 Travis Tilley (RETIRED) gentoo-dev 2004-05-29 20:50:45 UTC
gcc is broken, not glibc. the latest ebuilds should be fixed... re-open this bug if the problem still exists in gcc 3.4.0-r5