[Bug libstdc++/38081] time_get<>::do_get_weekday does not always recognize full names of weekdays

2010-01-05 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2010-01-05 20:10 
---
Fixed.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.0


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



[Bug libstdc++/38081] time_get<>::do_get_weekday does not always recognize full names of weekdays

2010-01-05 Thread paolo at gcc dot gnu dot org


--- Comment #4 from paolo at gcc dot gnu dot org  2010-01-05 20:05 ---
Subject: Bug 38081

Author: paolo
Date: Tue Jan  5 20:05:20 2010
New Revision: 155659

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155659
Log:
2010-01-05  Paolo Carlini  

PR libstdc++/38081
* include/bits/locale_facets_nonio.h (time_get<>::
_M_extract_wday_or_month): New, declare.
* include/bits/locale_facets_nonio.tcc (time_get<>::
_M_extract_wday_or_month): Define.
(time_get<>::do_get_weekday, time_get<>::do_get_monthname): Use it.
* config/abi/pre/gnu.ver: Export new symbols.
* doc/xml/manual/prerequisites.xml: Add ru_RU.UTF-8 and
ru_RU.ISO-8859-5.
* testsuite/lib/libstdc++.exp: Adjust.
* testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: New.
* testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.



Added:
trunk/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
trunk/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu.ver
trunk/libstdc++-v3/doc/xml/manual/prerequisites.xml
trunk/libstdc++-v3/include/bits/locale_facets_nonio.h
trunk/libstdc++-v3/include/bits/locale_facets_nonio.tcc
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp


-- 


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



[Bug libstdc++/38081] time_get<>::do_get_weekday does not always recognize full names of weekdays

2010-01-01 Thread paolo dot carlini at oracle dot com


--- Comment #3 from paolo dot carlini at oracle dot com  2010-01-02 03:06 
---
I'm working on this, and I want to make sure we agree about the third case. As
I understand the Standard, the expected is 1, not -1, that is, I don't see
anything wrong with parsing Pndedelnik as Pnd followed by an 'e'. Of course the
parsing (at variance with the current behavior) must stop on that 'e', with
error status good instead of eof. In fact, in this case the abbreviation is
*not* followed by characters that could match a full name (as is the case of
Monday in English, for example), and the facet simply doesn't continue reading
beyond that 'e'. In other terms, I don't see why Pndedelnik should be different
from 'Pnd ', that is Pnd followed by a space (which I'm sure we agree it's
fine).


-- 


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



[Bug libstdc++/38081] time_get<>::do_get_weekday does not always recognize full names of weekdays

2008-11-11 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2008-11-11 13:50 
---
Ok.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
   |dot org |dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-11-11 13:50:28
   date||


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



[Bug libstdc++/38081] time_get<>::do_get_weekday does not always recognize full names of weekdays

2008-11-11 Thread tsyvarev at ispras dot ru


--- Comment #1 from tsyvarev at ispras dot ru  2008-11-11 13:41 ---
Created an attachment (id=16652)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16652&action=view)
Reproduce bug with recognition of name of weekday

This test require locale "ru_RU.iso88595" is installed.

[EMAIL PROTECTED]:/mnt/hgfs/shared/temp/test$ g++ test.cpp && ./a.out
t.tm_wday becomes 1, expected 1
t.tm_wday becomes -1, expected 1
t.tm_wday becomes 1, expected -1

In Russian locale every abbriviated name of month is always a prefix of full
name, so conclusion about do_get_monthname() is done only according its code.


-- 


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