From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Uwe F. Mayer" To: Subject: c++/2644: g++ produces wrong code Date: Wed, 25 Apr 2001 13:16:00 -0000 Message-id: X-SW-Source: 2001-04/msg00543.html List-Id: >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::digits and numeric_limits::max() return zero (0) instead of the limits of the type w_char. >How-To-Repeat: Run this code: #include #include using namespace std; // needs g++ version 3 int main() { cout <::digits <<"\twchar_t digits\n"; cout <(numeric_limits::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: