public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Uwe F. Mayer" <mayer@tux.org>
To: <gcc-gnats@gcc.gnu.org>
Subject: c++/2644: g++ produces wrong code
Date: Wed, 25 Apr 2001 13:16:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0104251306140.5565-100000@tosca.localnet> (raw)

>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:


             reply	other threads:[~2001-04-25 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-25 13:16 Uwe F. Mayer [this message]
2001-04-25 21:16 Gabriel Dos Reis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0104251306140.5565-100000@tosca.localnet \
    --to=mayer@tux.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).