libstdc++/9378: 64-bit g++: construct base:std::moneypunct_byname<char>->memory fault

Benjamin Kosnik bkoz@redhat.com
Thu Jan 30 01:36:00 GMT 2003


The following reply was made to PR libstdc++/9378; it has been noted by GNATS.

From: Benjamin Kosnik <bkoz@redhat.com>
To: Martin Sebor <sebor@roguewave.com>
Cc: bkoz@gcc.gnu.org, axiong@ca.ibm.com, gcc-bugs@gcc.gnu.org,
	gcc-prs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/9378: 64-bit g++: construct base:std::moneypunct_byname<char>->memory fault
Date: Wed, 29 Jan 2003 20:34:37 -0600

 On Wed, 29 Jan 2003 14:24:10 -0700
 Martin Sebor <sebor@roguewave.com> wrote:
 
 >
 >FWIW, I don't think the requirements on the ctors of class
 >locale are relevant in this case. The problem is, IMO, that
 >there are no requirements at all on the ctors of the byname
 >facets, so pretty much anything goes. I.e., abort is just
 >as legal as successful construction.
 
 Hmm. I wasn't paying attention, and didn't realize these were _byname facets. 
 It doesn't really matter though, because....
 
 22.1.1.1.2 - Class locale::facet [lib.locale.facet]
 
 -4- For some standard facets a standard ``..._byname'' class, derived
 from it, implements the virtual function semantics equivalent to that
 facet of the locale constructed by locale(const char*) with the same
 name. 
 
 So, with this equivalence argument, I think the original point still
 holds: these name strings are implementation-defined, and people should
 not assume that any arbitray string will in fact, lead to a constructed
 locale object.
 
 -benjamin



More information about the Gcc-prs mailing list