From owner-freebsd-current@FreeBSD.ORG Sat Jul 12 19:50:31 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 556E137B401 for ; Sat, 12 Jul 2003 19:50:31 -0700 (PDT) Received: from smtpout.mac.com (A17-250-248-89.apple.com [17.250.248.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCB3143FB1 for ; Sat, 12 Jul 2003 19:50:30 -0700 (PDT) (envelope-from leimy2k@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h6D2oO17026679; Sat, 12 Jul 2003 19:50:25 -0700 (PDT) Received: from mac.com (adsl-78-178-166.jan.bellsouth.net [216.78.178.166]) (authenticated bits=0) by mac.com (Xserve/8.12.9/MantshX 2.0) with ESMTP id h6D2f8IL028590; Sat, 12 Jul 2003 19:50:22 -0700 (PDT) In-Reply-To: <20030712155333.GA79322@crodrigues.org> References: <20030712155333.GA79322@crodrigues.org> Mime-Version: 1.0 (Apple Message framework v578) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Leimbach Date: Sat, 12 Jul 2003 21:50:21 -0500 To: Craig Rodrigues X-Mailer: Apple Mail (2.578) cc: freebsd-current@freebsd.org Subject: Re: GCC 3.3.1, new warnings with X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 02:50:31 -0000 Heh that's because the offending macro __glibcpp_digits calls __glibcpp_signed (T) on an unsigned type which does a < compareison. std::numeric_limits ::digits on a 32bit FBSD will yield 31 because its got 31 bits for magnitude. Unfortunately the way it seems to go about calculating that stuff at compile time seems to be invalid due to the fact that it does < 0 compares on unsigned types. Is this a gcc issue or a FBSD issue? [is this the original gcc c++ header file or has it been tweaked?] Dave On Saturday, July 12, 2003, at 10:53AM, Craig Rodrigues wrote: > Hi, > > If I compile the following program: > > #include > int main(int argc, char *argv[] { return 0; } > > with the following flags: > > g++ -W -Wall b.cc > > > I get lots of warnings that did not appear in GCC 3.2: > > In file included from /usr/include/c++/3.3/bits/locale_facets.tcc:43, > from /usr/include/c++/3.3/locale:47, > from /usr/include/c++/3.3/bits/ostream.tcc:37, > from /usr/include/c++/3.3/ostream:535, > from /usr/include/c++/3.3/iostream:45, > from b.cc:1: > /usr/include/c++/3.3/limits:630: warning: comparison of unsigned > expression < 0 > is always false > /usr/include/c++/3.3/limits:631: warning: comparison of unsigned > expression < 0 > is always false > /usr/include/c++/3.3/limits:730: warning: comparison of unsigned > expression < 0 > is always false > /usr/include/c++/3.3/limits:731: warning: comparison of unsigned > expression < 0 > is always false > /usr/include/c++/3.3/limits:830: warning: comparison of unsigned > expression < 0 > is always false > /usr/include/c++/3.3/limits:831: warning: comparison of unsigned > expression < 0 > is always false > > > > > Is there a way to fix the header file? > -- > Craig Rodrigues > http://crodrigues.org > rodrigc@crodrigues.org > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"