mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
c534e37fac
We were using the empty string "" for D_T_FMT and ERA_D_T_FMT in the C locale, instead of "%a %b %e %T %Y" as the C standard requires. Set it correctly for each locale implementation that defines time_members.cc. We can also explicitly set the _M_era_xxx pointers to the same values as the corresponding _M_xxx ones, rather than setting them to point to identical string literals. This doesn't rely on the compiler merging string literals, and makes it more explicit that they're the same in the C locale. libstdc++-v3/ChangeLog: * config/locale/dragonfly/time_members.cc (__timepunct<char>::_M_initialize_timepunc) (__timepunct<wchar_t>::_M_initialize_timepunc): Set _M_date_time_format for C locale. Set %Ex formats to the same values as the %x formats. * config/locale/generic/time_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * testsuite/22_locale/time_get/get/char/5.cc: New test. * testsuite/22_locale/time_get/get/wchar_t/5.cc: New test. |
||
---|---|---|
.. | ||
abi | ||
allocator | ||
cpu | ||
io | ||
locale | ||
os |