GCC 3.3.1, new warnings with <limits>

Craig Rodrigues rodrigc at crodrigues.org
Sat Jul 12 08:52:32 PDT 2003


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


More information about the freebsd-current mailing list