public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/26020]  New: std::advance() isn't stable for floating point numbers
@ 2006-01-29 23:06 Woebbeking at web dot de
  2006-01-29 23:32 ` [Bug libstdc++/26020] " pinskia at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Woebbeking at web dot de @ 2006-01-29 23:06 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

Hi,

i.e. code like

list<int> bla;
// insert some stuff into bla
list<int>::iterator it(bla.begin());
advance(it, bla.size() * 0.5);

can lead to an endless loop. I know that the code is "broken" but it should
work nevertheless. Please change the code to < 0 and > 0, not just while (n--).


Cheers,
André


-- 
           Summary: std::advance() isn't stable for floating point numbers
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Woebbeking at web dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26020


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2006-10-17 15:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-29 23:06 [Bug libstdc++/26020] New: std::advance() isn't stable for floating point numbers Woebbeking at web dot de
2006-01-29 23:32 ` [Bug libstdc++/26020] " pinskia at gcc dot gnu dot org
2006-01-29 23:40 ` Woebbeking at web dot de
2006-01-30  0:24 ` pcarlini at suse dot de
2006-01-30  0:35 ` gdr at integrable-solutions dot net
2006-01-30  0:45 ` pcarlini at suse dot de
2006-01-30  0:57 ` pcarlini at suse dot de
2006-01-30  1:05 ` gdr at integrable-solutions dot net
2006-01-30  1:07 ` gdr at integrable-solutions dot net
2006-01-30  1:09 ` pcarlini at suse dot de
2006-01-30  7:08 ` Woebbeking at web dot de
2006-01-30  7:54 ` gdr at integrable-solutions dot net
2006-01-30 12:03 ` Woebbeking at web dot de
2006-01-30 12:50 ` gdr at integrable-solutions dot net
2006-10-17 13:01 ` pcarlini at suse dot de
2006-10-17 15:17 ` paolo at gcc dot gnu dot org
2006-10-17 15:18 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).