public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/8887: locale
@ 2002-12-11 16:25 paolo
  0 siblings, 0 replies; 6+ messages in thread
From: paolo @ 2002-12-11 16:25 UTC (permalink / raw)
  To: dmitry_belous, gcc-bugs, gcc-prs, paolo

Synopsis: locale

State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Wed Dec 11 16:25:41 2002
State-Changed-Why:
    Fixed for 3.3 and 3.2.2 with:
    http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00640.html

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8887


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

* Re: libstdc++/8887: locale
@ 2002-12-11 10:26 Paolo Carlini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Carlini @ 2002-12-11 10:26 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/8887; it has been noted by GNATS.

From: Paolo Carlini <pcarlini@unitus.it>
To: dmitry_belous@ua.fm,  gcc-gnats@gcc.gnu.org,  gcc-prs@gcc.gnu.org, 
 gcc-bugs@gcc.gnu.org,  paolo@gcc.gnu.org
Cc: bkoz <bkoz@redhat.com>
Subject: Re: libstdc++/8887: locale
Date: Wed, 11 Dec 2002 19:22:42 +0100

 Yes, configuring --enable-clocale=generic, something
 wrong happens:
 
 paolo:~> a.out
 12/11/02
 12/11/00paolo:~>
 
 The dates are unexpectedly different!
 
 Investigating further...
 
 Ciao,
 Paolo.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8887
 


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

* Re: libstdc++/8887: locale
@ 2002-12-11  9:01 bkoz
  0 siblings, 0 replies; 6+ messages in thread
From: bkoz @ 2002-12-11  9:01 UTC (permalink / raw)
  To: dmitry_belous, gcc-bugs, gcc-prs, paolo

Synopsis: locale

State-Changed-From-To: feedback->analyzed
State-Changed-By: bkoz
State-Changed-When: Wed Dec 11 09:01:55 2002
State-Changed-Why:
    He's on W2k, using cygwin, so you'll have to use the generic locale model.
    
    -benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8887


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

* Re: libstdc++/8887: locale
@ 2002-12-10 15:56 Paolo Carlini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Carlini @ 2002-12-10 15:56 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/8887; it has been noted by GNATS.

From: Paolo Carlini <pcarlini@unitus.it>
To: dmitry_belous@ua.fm,  gcc-gnats@gcc.gnu.org,  gcc-prs@gcc.gnu.org, 
 gcc-bugs@gcc.gnu.org,  paolo@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/8887: locale
Date: Wed, 11 Dec 2002 00:52:26 +0100

 Sorry: s/warning/error
 
 Paolo.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8887
 


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

* Re: libstdc++/8887: locale
@ 2002-12-10 15:45 paolo
  0 siblings, 0 replies; 6+ messages in thread
From: paolo @ 2002-12-10 15:45 UTC (permalink / raw)
  To: dmitry_belous, gcc-bugs, gcc-prs, nobody, paolo

Synopsis: locale

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Dec 10 15:45:41 2002
Responsible-Changed-Why:
    Analyzed a bit.
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Tue Dec 10 15:45:41 2002
State-Changed-Why:
    What are you actually getting at run time?
    If, paying attention to the warning ;), I modify line #8
    of your testcase from
      tm* lt = localtime(&time(0));
    to something like
      time_t tt = time(0);
      tm* lt = localtime(&tt);
    The date is correctly printed twice on my i686-pc-linux-gnu
    box.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8887


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

* libstdc++/8887: locale
@ 2002-12-10  0:56 dmitry_belous
  0 siblings, 0 replies; 6+ messages in thread
From: dmitry_belous @ 2002-12-10  0:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8887
>Category:       libstdc++
>Synopsis:       locale
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 10 00:56:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     dmitry_belous@ua.fm
>Release:        3.2 20020818 (prerelease)
>Organization:
>Environment:
System: W2K
Architecture: i686
host: i686-pc-cygwin
build: i686-pc-cygwin
target: i686-pc-cygwin
>Description:
Class time_get<> is not corresponding to time_put<>.
Source documentation
`22 - Localization library [lib.localization]',
section 22.2.5.1 (-1-) && 22.2.5.1.2 (-4-).
For example, running the following program tnum should
print like dates.
>How-To-Repeat:
#include <locale>
#include <sstream>
#include <iostream>

int main()
{
	using namespace std;
	tm* lt = localtime(&time(0));
	try {
		const time_put<char>& tp = use_facet<time_put<char> >(locale());
		const time_get<char>& tg = use_facet<time_get<char> >(locale());
		ostringstream os;
		tp.put(os, os, os.fill(), lt, 'x');
		cout << os.str() << endl;
		istringstream is(os.str());
		istreambuf_iterator<char> end;
		ios_base::iostate err = ios_base::goodbit;
		tm x = {0};
		tg.get_date(is, end, is, err, &x);
		tp.put(cout, cout, cout.fill(), &x, 'x');
	} catch(...) {
		cerr << "error" << endl;
	}
}

g++ -ansi -v -o main.exe main.cpp -W -Wall -g
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-1/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)
 /usr/lib/gcc-lib/i686-pc-cygwin/3.2/cc1plus.exe -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__tune_pentium2__ -D__tune_pentium3__ -D__stdcall=__attribute__((__stdcall__)) -D__fastcall=__attribute__((__fastcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386__ -D__i386 -D__CYGWIN32__ -D__CYGWIN__ -D__unix__ -D__unix -isystem /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../include/w32api -isystem /usr/local/lib/../../include/w32api main.cpp -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__STRICT_ANSI__ -trigraphs -$ -quiet -dumpbase main.cpp -ansi -g -W -Wall -ansi -version -o /tmp/ccdCW2C3.s
GNU CPP version 3.2 20020818 (prerelease) (cpplib) (80386, BSD syntax)
GNU C++ version 3.2 20020818 (prerelease) (i686-pc-cygwin)
	compiled by GNU C version 3.2 20020815 (prerelease).
ignoring nonexistent directory "/usr/i686-pc-cygwin/include"
ignoring duplicate directory "/usr/include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/include/libxml2
 /usr/include/w32api
 /usr/include/c++/3.2
 /usr/include/c++/3.2/i686-pc-cygwin
 /usr/include/c++/3.2/backward
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include
 /usr/include
End of search list.
main.cpp: In function `int main()':
main.cpp:8: non-lvalue in unary `&'
main.cpp:18: warning: missing initializer for member `tm::tm_min'
main.cpp:18: warning: missing initializer for member `tm::tm_hour'
main.cpp:18: warning: missing initializer for member `tm::tm_mday'
main.cpp:18: warning: missing initializer for member `tm::tm_mon'
main.cpp:18: warning: missing initializer for member `tm::tm_year'
main.cpp:18: warning: missing initializer for member `tm::tm_wday'
main.cpp:18: warning: missing initializer for member `tm::tm_yday'
main.cpp:18: warning: missing initializer for member `tm::tm_isdst'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-12  0:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11 16:25 libstdc++/8887: locale paolo
  -- strict thread matches above, loose matches on Subject: below --
2002-12-11 10:26 Paolo Carlini
2002-12-11  9:01 bkoz
2002-12-10 15:56 Paolo Carlini
2002-12-10 15:45 paolo
2002-12-10  0:56 dmitry_belous

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).