Heh that's because the offending macro __glibcpp_digits calls __glibcpp_signed (T) on an unsigned type which does a < compareison. std::numeric_limits <signed long>::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 <iostream> > 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 <limits> header file? > -- > Craig Rodrigues > http://crodrigues.org > rodrigc_at_crodrigues.org > _______________________________________________ > freebsd-current_at_freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe_at_freebsd.org"Received on Sat Jul 12 2003 - 17:50:31 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:14 UTC