This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: STL compiler warning, very strange


> I am getting a rather strange warning (using -Wall) from gcc with
> STL with the following code.  When using an iterator in deque::erase()
> I'm getting a warning about comparing a signed to an unsigned:
[...]
>         schedule_q.erase( index);  <-- here
[...]
> /usr/local/include/g++/stl_deque.h: In method `struct
> __deque_iterator<instruction_t,instruction_t &,instruction_t *,0>
> deque<instruction_t,__default_alloc_template<false,0>,0>::erase<
> instruction_t, alloc, 0>(struct __deque_iterator<instruction_t,instruction_t
> &,instruction_t *,0>)':
> SEQ_FPU_Irr.C:369:   instantiated from here
> /usr/local/include/g++/stl_deque.h:533: warning: comparison between signed and
> unsigned

Thanks for your bug report. Please have a look at the error again, it
indicates that the problem is in line 533 of stl_deque.h, i.e. in
libstdc++ proper. It shouldn't be too difficult to correct this in
your installation of gcc; please send a patch to
gcc-patches@gcc.gnu.org when you found a fix that
works. Alternatively, you could check the latest version of SGI STL,
since g++ always incorporates the SGI code in this area.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]