public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2644: g++ produces wrong code
@ 2001-04-25 21:16 Gabriel Dos Reis
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Dos Reis @ 2001-04-25 21:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: "Uwe F. Mayer" <mayer@tux.org>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/2644: g++ produces wrong code
Date: 26 Apr 2001 06:13:20 +0200

 "Uwe F. Mayer" <mayer@tux.org> writes:
 
 | >Environment:
 | System: Linux tosca 2.2.18 #2 Thu Mar 8 13:48:25 PST 2001 i686 unknown
 | Architecture: i686
 | host: i686-pc-linux-gnu
 | build: i686-pc-linux-gnu
 | target: i686-pc-linux-gnu
 | configured with: ../gcc/configure --prefix=/usr/local/gcc --disable-nls
 | >Description:
 | The calls
 | numeric_limits<wchar_t >::digits
 | and
 | numeric_limits<wchar_t >::max()
 | return zero (0) instead of the limits of the type w_char.
 
 This is indeed a bug.  Actually, it is the specialization
 numeric_limits<wchar_t> which is missing.
 
 | >Fix:
 | I assume that ..../lib/gcc-lib/i686-pc-linux-gnu/3.0/include/limits.h
 | needs to be fixed.
 
 Actually -not-. That file it C bits.  The right fix should happen in
 mknumeric_limits and gen-num-limits.cc
 
 -- Gaby


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

* c++/2644: g++ produces wrong code
@ 2001-04-25 13:16 Uwe F. Mayer
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe F. Mayer @ 2001-04-25 13:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2644
>Category:       c++
>Synopsis:       g++ produces wrong code
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 25 13:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Uwe F. Mayer
>Release:        3.0 20010312 (prerelease)
>Organization:
tux.org
>Environment:
System: Linux tosca 2.2.18 #2 Thu Mar 8 13:48:25 PST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --disable-nls
>Description:
The calls
numeric_limits<wchar_t >::digits
and
numeric_limits<wchar_t >::max()
return zero (0) instead of the limits of the type w_char.
>How-To-Repeat:
Run this code:
#include <iostream.h>
#include <limits>
using namespace std;
// needs g++ version 3
int main() {
  cout <<numeric_limits<wchar_t >::digits <<"\twchar_t digits\n";
  cout <<static_cast<int>(numeric_limits<wchar_t >::max()) <<"\twchar_t max\n";
}
>Fix:
I assume that ..../lib/gcc-lib/i686-pc-linux-gnu/3.0/include/limits.h
needs to be fixed.



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


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

end of thread, other threads:[~2001-04-25 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-25 21:16 c++/2644: g++ produces wrong code Gabriel Dos Reis
  -- strict thread matches above, loose matches on Subject: below --
2001-04-25 13:16 Uwe F. Mayer

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