This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Synopsis: 64-bit g++: construct base:std::moneypunct_byname<char>->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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]