From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4456 invoked by alias); 29 Jan 2003 21:05:11 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4437 invoked by uid 48); 29 Jan 2003 21:05:11 -0000 Date: Wed, 29 Jan 2003 21:05:00 -0000 Message-ID: <20030129210511.4436.qmail@sources.redhat.com> To: axiong@ca.ibm.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bkoz@gcc.gnu.org Reply-To: bkoz@gcc.gnu.org, axiong@ca.ibm.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/9378: 64-bit g++: construct base:std::moneypunct_byname->memory fault X-SW-Source: 2003-01/txt/msg01710.txt.bz2 List-Id: Synopsis: 64-bit g++: construct base:std::moneypunct_byname->memory fault State-Changed-From-To: open->feedback State-Changed-By: bkoz State-Changed-When: Wed Jan 29 21:05:10 2003 State-Changed-Why: Thanks for the IBM guys being so quick on this one. For your compilation errors, talk to Mr. Modra or Janis, they'll be able to point you to compilers that work. As for your code, Janis is correct. The behavior reported: What's supposed to happen here? With mainline, for both 32-bit and native 64-bit powerpc64-linux I get: elm3b10% a.out terminate called after throwing an instance of 'std::runtime_error' what(): attempt to create locale from unknown name Aborted Is correct. Here's why: ISO 14882: 22.1.1.2 locale ctors and dtors throws: runtime_error if the argument is ont valid, or is null. The set of valid string argument values is "C", "", and any implementation-defined values. In the above case, you're trying to create a locale based on the implementation-defined value of "abc." The GNU implemenation defines this value to be junk, and errors out. (Correctly so, I think.) Current libstdc++/g++ combos are more strict on this than other C++ libraries (namely, ones that only do one locale.) This was an issue in some commerical C++ library validators until the above was pointed out to them. best, benjamin http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9378