public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45896] New: Facet time_get not reading dates according to the standard.
@ 2010-10-05 16:11 alexander.rojas at gmail dot com
  2010-10-05 16:46 ` [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: alexander.rojas at gmail dot com @ 2010-10-05 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Facet time_get not reading dates according to the
                    standard.
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: alexander.rojas@gmail.com


I just create a simple program to exchange dates formats based in locales.
According to the standard (
http://www.opengroup.org/onlinepubs/9699919799/functions/strptime.html ) a date
like 2/2/2005 would be a valid date. However the program fails with that input.
It requires 02/02/2005 to work.

The compiler options where set to:
g++ -v -save-temps -odate date.cpp

the program compiles without errors or warnings.

This is the dump of my system information:


Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-odate' '-shared-libgcc'
'-mtune=generic'
 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/cc1plus -E -quiet -v -D_GNU_SOURCE
date.cpp -D_FORTIFY_SOURCE=2 -mtune=generic -fpch-preprocess -fstack-protector
-o date.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.4
 /usr/include/c++/4.4/x86_64-linux-gnu
 /usr/include/c++/4.4/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include
 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-odate' '-shared-libgcc'
'-mtune=generic'
 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/cc1plus -fpreprocessed date.ii -quiet
-dumpbase date.cpp -mtune=generic -auxbase date -version -fstack-protector -o
date.s
GNU C++ (Ubuntu 4.4.3-4ubuntu5) version 4.4.3 (x86_64-linux-gnu)
        compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version
2.4.2-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Ubuntu 4.4.3-4ubuntu5) version 4.4.3 (x86_64-linux-gnu)
        compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version
2.4.2-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 88858f45841827736473e527a4e9ab10
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-odate' '-shared-libgcc'
'-mtune=generic'
 as -V -Qy -o date.o date.s
GNU assembler version 2.20.1 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.20.1-system.20100303
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../:/lib/:/usr/lib/:/usr/lib/x86_64-linux-gnu/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-odate' '-shared-libgcc'
'-mtune=generic'
 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/collect2 --build-id --eh-frame-hdr -m
elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 -odate
-z relro /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3
-L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../..
-L/usr/lib/x86_64-linux-gnu date.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crtn.o


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
  2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
@ 2010-10-05 16:46 ` paolo.carlini at oracle dot com
  2010-10-05 17:57 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-10-05 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
            Summary|Facet time_get not reading  |[C++0x] Facet time_get not
                   |dates according to the      |reading dates according to
                   |standard.                   |the IEEE 1003 standard.
           Severity|normal                      |enhancement

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-10-05 16:46:41 UTC ---
I suppose you are referring to the sentences "leading zeros shall be permitted
but shall not be required", right? Because they do *not* exist in the C(99) ISO
Standard, which is the normative reference for C++98, in this area. In general,
ISO 8601, in turn, is pretty strict about those formats.

Only C++0x references explicitly "the ISO/IEC 9945 function strptime" (ISO/IEC
9945 is the same as IEEE 1003), which is more flexible about leading zeros.
Thus, C++0x work, in due course...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
  2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
  2010-10-05 16:46 ` [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard paolo.carlini at oracle dot com
@ 2010-10-05 17:57 ` paolo.carlini at oracle dot com
  2010-10-05 18:24 ` [Bug libstdc++/45896] " paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-10-05 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.10.05 17:57:04
     Ever Confirmed|0                           |1

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-10-05 17:57:04 UTC ---
Can fix pretty quickly.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
  2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
  2010-10-05 16:46 ` [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard paolo.carlini at oracle dot com
  2010-10-05 17:57 ` paolo.carlini at oracle dot com
@ 2010-10-05 18:24 ` paolo.carlini at oracle dot com
  2021-03-07 16:30 ` redi at gcc dot gnu.org
  2021-12-10 16:20 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-10-05 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                 CC|                            |paolo.carlini at oracle dot
                   |                            |com
          Component|c++                         |libstdc++

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-10-05 18:24:44 UTC ---
Actually, adding this sort of flexibility then hits
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461. Better
dealing with this as part of a more general review of time_get for C++0x.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
  2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
                   ` (2 preceding siblings ...)
  2010-10-05 18:24 ` [Bug libstdc++/45896] " paolo.carlini at oracle dot com
@ 2021-03-07 16:30 ` redi at gcc dot gnu.org
  2021-12-10 16:20 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-03-07 16:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45896

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lewis at sophists dot com

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 99439 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
  2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
                   ` (3 preceding siblings ...)
  2021-03-07 16:30 ` redi at gcc dot gnu.org
@ 2021-12-10 16:20 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-10 16:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45896

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Partly changed by the PR78714
r12-5898-gc82e492616e343b6d6db218d2b498267bac899de commit, but only for
non-year format.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-10 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-05 16:11 [Bug c++/45896] New: Facet time_get not reading dates according to the standard alexander.rojas at gmail dot com
2010-10-05 16:46 ` [Bug c++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard paolo.carlini at oracle dot com
2010-10-05 17:57 ` paolo.carlini at oracle dot com
2010-10-05 18:24 ` [Bug libstdc++/45896] " paolo.carlini at oracle dot com
2021-03-07 16:30 ` redi at gcc dot gnu.org
2021-12-10 16:20 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).