public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t
@ 2007-04-12 18:06 djg at cray dot com
2007-04-12 18:09 ` [Bug libstdc++/31554] " djg at cray dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: djg at cray dot com @ 2007-04-12 18:06 UTC (permalink / raw)
To: gcc-bugs
Instantiating stable_partition with an iterator where the difference_type is
something different than ptrdiff_t results in an error like this:
.../bits/stl_algo.h: In function `_ForwardIterator
std::stable_partition(_ForwardIterator, _ForwardIterator, _Predicate) [with
_ForwardIterator = my_iterator, _Predicate = bool (*)(double)]':
test.c:32: instantiated from here
.../bits/stl_algo.h:2154: error: no matching function for call to
`__stable_partition_adaptive(my_iterator&, my_iterator&, bool (*&)(double),
short int, double*, ptrdiff_t)'
The __stable_parition_adaptive effectively requires the __len and __buffer_size
arguments to have the same type, and stable_parition calls it with one of them
always as ptrdiff_t.
--
Summary: stable_partition assumes iterator difference type is
always ptrdiff_t
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: djg at cray dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
@ 2007-04-12 18:09 ` djg at cray dot com
2007-04-12 18:59 ` pcarlini at suse dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: djg at cray dot com @ 2007-04-12 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from djg at cray dot com 2007-04-12 19:09 -------
*** Bug 31555 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
2007-04-12 18:09 ` [Bug libstdc++/31554] " djg at cray dot com
@ 2007-04-12 18:59 ` pcarlini at suse dot de
2007-04-12 20:53 ` djg at cray dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-04-12 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2007-04-12 19:59 -------
Confirmed. I will look into this as soon as possible, first blush, I'm
wondering whether just calling __stable_partition_adaptive with a last
argument:
..., _DistanceType(__buf.size()))
would be enough to fix the problem? What do you think?
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at suse dot de
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-04-12 19:59:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
2007-04-12 18:09 ` [Bug libstdc++/31554] " djg at cray dot com
2007-04-12 18:59 ` pcarlini at suse dot de
@ 2007-04-12 20:53 ` djg at cray dot com
2007-04-12 21:06 ` pcarlini at suse dot de
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: djg at cray dot com @ 2007-04-12 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from djg at cray dot com 2007-04-12 21:53 -------
(In reply to comment #2)
At a glance, that looks right to me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
` (2 preceding siblings ...)
2007-04-12 20:53 ` djg at cray dot com
@ 2007-04-12 21:06 ` pcarlini at suse dot de
2007-04-13 11:17 ` paolo at gcc dot gnu dot org
2007-04-13 11:18 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-04-12 21:06 UTC (permalink / raw)
To: gcc-bugs
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|pcarlini at suse dot de |
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
` (3 preceding siblings ...)
2007-04-12 21:06 ` pcarlini at suse dot de
@ 2007-04-13 11:17 ` paolo at gcc dot gnu dot org
2007-04-13 11:18 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-04-13 11:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo at gcc dot gnu dot org 2007-04-13 12:17 -------
Subject: Bug 31554
Author: paolo
Date: Fri Apr 13 12:17:21 2007
New Revision: 123783
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123783
Log:
2007-04-13 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31554
* include/bits/stl_algo.h (stable_partition): Convert __buf.size()
to _DistanceType.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_algo.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/31554] stable_partition assumes iterator difference type is always ptrdiff_t
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
` (4 preceding siblings ...)
2007-04-13 11:17 ` paolo at gcc dot gnu dot org
@ 2007-04-13 11:18 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-04-13 11:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pcarlini at suse dot de 2007-04-13 12:18 -------
Fixed.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31554
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-13 11:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-12 18:06 [Bug libstdc++/31554] New: stable_partition assumes iterator difference type is always ptrdiff_t djg at cray dot com
2007-04-12 18:09 ` [Bug libstdc++/31554] " djg at cray dot com
2007-04-12 18:59 ` pcarlini at suse dot de
2007-04-12 20:53 ` djg at cray dot com
2007-04-12 21:06 ` pcarlini at suse dot de
2007-04-13 11:17 ` paolo at gcc dot gnu dot org
2007-04-13 11: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).