From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8160 invoked by alias); 31 Oct 2003 20:39:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8150 invoked by uid 48); 31 Oct 2003 20:39:08 -0000 Date: Fri, 31 Oct 2003 20:40:00 -0000 Message-ID: <20031031203908.8148.qmail@sources.redhat.com> From: "paolo at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031031155935.12859.pthomas@suse.de> References: <20031031155935.12859.pthomas@suse.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/12859] Output of floating point value changes global lokale X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg02856.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12859 paolo at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |paolo at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2003-10-31 20:39:07 date| | ------- Additional Comments From paolo at gcc dot gnu dot org 2003-10-31 20:39 ------- Hi, I can reproduce it and construct a pure "C" testcase in this sense: in v3 we use glibc uselocale assuming the the semantics is such that the below outputs 0, 1024, 0, 1024 *not* 0, 1024, 0, 0 !! #define _GNU_SOURCE 1 #include #include int main() { __locale_t loc_new, loc_old; printf("%d\n", isalpha(0xE4)); // 0 setlocale ( LC_ALL, "de_DE" ); printf("%d\n", isalpha(0xE4)); // 1024 loc_new = newlocale(1 << LC_ALL, "C", 0); loc_old = uselocale(loc_new); printf("%d\n", isalpha(0xE4)); // 0 uselocale(loc_old); printf("%d\n", isalpha(0xE4)); // 0 *not* 1024! freelocale(loc_new); return 0; } What are we doing wrong?? Why the (global) de_DE locale is not restored for the current thread by the second uselocale? I hope to sort this out before leaving to Nuremberg! Paolo.