[Bug libstdc++/38411] [4.4 Regression] Revision 142439 caused 22_locale/locale/cons/7.cc execution test

tsyvarev at ispras dot ru gcc-bugzilla@gcc.gnu.org
Fri Dec 5 11:09:00 GMT 2008



------- Comment #19 from tsyvarev at ispras dot ru  2008-12-05 11:08 -------
It seems that C++ standard contains contradiction about thousands separator in
"C" locale:

22.2.3.1, p1 says:

The instantiations required in Table 51 (22.1.1.1.1), namely numpunct<wchar_t>
and numpunct<char>, provide classic “C” numeric formats, i.e. they contain
information equivalent to that contained in the “C” locale or their wide
character counterparts as if obtained by a call to widen.

also, 22.2.3.1.2 p.2 says:

char_type do_thousands_sep() const;

Returns: A character for use as the digit group separator. The required
instantiations return Â’,Â’ or LÂ’,Â’.

It appears, that according to C++ standard, thousands separator for "C" locale
is ','.

But according to the ISO standard of "C"("POSIX") locale (Section 7.3, Locale
Definition), thousands separator in this locale should be '\0', which means N/A
or not assigned.

Or is this reasoning wrong?


-- 

tsyvarev at ispras dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tsyvarev at ispras dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38411



More information about the Gcc-bugs mailing list