From mboxrd@z Thu Jan 1 00:00:00 1970 From: mattryan@us.ibm.com To: gcc-bugs@gcc.gnu.org Subject: bug report Date: Fri, 31 Dec 1999 20:54:00 -0000 Message-id: <87256847.006A1E31.00@d53mta08h.boulder.ibm.com> X-SW-Source: 1999-12n/msg00426.html List-Id: To whom it may concern: I am having some compile warnings when I use STL deques (or containers based on deques) in C++ applications. I am not sure if you were aware of them but I wanted to at least make them known. Operating system: AIX 4.2.1.0 G++ version: 2.95.2 (also, 2.91.66 and 2.91.60 had similar issues) Compilation command: g++ -Wall -pedantic Problem encountered: Comparisons between signed and unsigned in /usr/local/include/g++-3/stl_deque.h. 1. At line 1051, in the statement "if (__elems_before < (size() - __n) / 2)", of method deque::iterator deque::erase() __elems_before is of type difference_type, which is a typedef of ptrdiff_t, which is a typedef of int size() returns a size_type, which is a typedef of size_t, which is a typedef of unsigned long 2. At line 1406, in the statement "if (__elemsbefore < __length / 2)", of method void deque::_M_insert_aux() __elemsbefore is of type difference_type, which is a typedef of ptrdiff_t, which is a typedef of int __length is of type size_type, which is a typedef of size_t, which is a typedef of unsigned long If this is not a bug, can you please advise as to the best method of resolving the warnings? Thank you for your tremendous efforts over the years. -Matt Ryan IBM Global Services C++ OOADD Software Engineer RepliData UNIX Development Team mattryan@us.ibm.com